Skip to content

Commit

Permalink
Merge pull request #278 from aio-libs/thehesiod/bump-aiohttp
Browse files Browse the repository at this point in the history
add support for latest aiohttp/botocore
  • Loading branch information
thehesiod authored Jul 4, 2017
2 parents 9f37a62 + 3f17b37 commit bb2736b
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 11 deletions.
4 changes: 3 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Changes
-------
0.4.2a0 (XXXX-XX-XX)
0.4.2 (2017-07-03)
^^^^^^^^^^^^^^^^^^
* update supported aiohttp requirement to: >=2.0.4, <=2.3.0
* update supported botocore requirement to: >=1.5.71, <=1.5.78

0.4.1 (2017-06-27)
^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion aiobotocore/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .session import get_session, AioSession

__all__ = ['get_session', 'AioSession']
__version__ = '0.4.2a0'
__version__ = '0.4.2'
13 changes: 11 additions & 2 deletions aiobotocore/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def __init__(self, event_emitter, user_agent, response_parser_factory,
response_parser_factory, loader, exceptions_factory)
self._loop = loop or asyncio.get_event_loop()

# NOTE: we override this so we can pull out the custom AioConfig params and
# use an AioEndpointCreator
def get_client_args(self, service_model, region_name, is_secure,
endpoint_url, verify, credentials, scoped_config,
client_config, endpoint_bridge):
Expand All @@ -31,9 +33,16 @@ def get_client_args(self, service_model, region_name, is_secure,
s3_config = final_args['s3_config']
partition = endpoint_config['metadata'].get('partition', None)

signing_region = endpoint_config['signing_region']
endpoint_region_name = endpoint_config['region_name']
if signing_region is None and endpoint_region_name is None:
signing_region, endpoint_region_name = \
self._get_default_s3_region(service_name, endpoint_bridge)
config_kwargs['region_name'] = endpoint_region_name

event_emitter = copy.copy(self._event_emitter)
signer = RequestSigner(
service_name, endpoint_config['signing_region'],
service_name, signing_region,
endpoint_config['signing_name'],
endpoint_config['signature_version'],
credentials, event_emitter)
Expand All @@ -49,7 +58,7 @@ def get_client_args(self, service_model, region_name, is_secure,
endpoint_creator = AioEndpointCreator(event_emitter, self._loop)

endpoint = endpoint_creator.create_endpoint(
service_model, region_name=endpoint_config['region_name'],
service_model, region_name=endpoint_region_name,
endpoint_url=endpoint_config['endpoint_url'], verify=verify,
response_parser_factory=self._response_parser_factory,
max_pool_connections=new_config.max_pool_connections,
Expand Down
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ moto==0.4.31
pytest-cov==2.5.1
pytest==3.1.2
sphinx==1.6.3
aiohttp==2.1.0
botocore==1.5.70
aiohttp==2.2.3
botocore==1.5.78
multidict==3.1.0
wrapt==1.10.10
dill==0.2.6
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# aiohttp requirement is pegged as we need to manually ensure that
# https://github.com/aio-libs/aiobotocore/pull/248 will continue working
install_requires = ['botocore>=1.5.34, <=1.5.70', 'aiohttp>=2.0.4, <=2.2.0',
install_requires = ['botocore>=1.5.71, <=1.5.78', 'aiohttp>=2.0.4, <=2.3.0',
'multidict>=2.1.4', 'wrapt>=1.10.10', 'packaging>=16.8']

PY_VER = sys.version_info
Expand Down
4 changes: 4 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
from aiobotocore.config import AioConfig
import tempfile
import shutil
import sys


PY_34 = (3, 4) <= sys.version_info <= (3, 5)


@pytest.fixture(scope="session", params=[True, False],
Expand Down
10 changes: 6 additions & 4 deletions tests/test_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@
# for our patch of _wait
StreamReader: {'dc5a5a33e86cedf2d2c8413d951d2274a79303f4'},

# for digging into _protocol
ClientResponse: {'d1e0c16dea4fe3426caa1e9b0dc9f5f1992d838e'},
# for digging into _protocol ( 2.1.x, 2.2.x )
ClientResponse: {'d1e0c16dea4fe3426caa1e9b0dc9f5f1992d838e',
'bc374038ac3bfd7cc13dadb6aebbf0f67ebb7620'},
}

# These are guards to our main patches
_API_DIGESTS = {
ClientArgsCreator: {'60b8b70358d25dcce1ad74b2f5f0b4830d5749a3'},
ClientCreator: {'a8c12a6b933fa22477cd4d168a96443be002ae79'},
ClientArgsCreator: {'813098fb076fc4739f7f6ec335960845e119f5f4'},
ClientCreator: {'a8c12a6b933fa22477cd4d168a96443be002ae79',
'1533fe9ffa395f8555ffad0fb5b6f5294d2c0f30'},
BaseClient: {'a91ffdb8d0c7cb2dfd63a4332a0a7a76e76cef28'},
Config: {'c6bdc8f47c90e114d406ecab3fcfbc6e4d034279'},
convert_to_response_dict: {'ed634b3f0c24f8858aee8ed745051397270b1e46'},
Expand Down

0 comments on commit bb2736b

Please sign in to comment.