Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump botocore to 1.23.24 #909

Merged
merged 4 commits into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Changes
-------
2.1.0 (2021-12-14)
^^^^^^^^^^^^^^^^^^
* bump to botocore 1.23.24
* fix aiohttp resolver config param #906

2.0.1 (2021-11-25)
^^^^^^^^^^^^^^^^^^
* revert accidental dupe of _register_s3_events #867 (thanks @eoghanmurray)
Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ coverage = "==5.5"
flake8 = "==3.9.0"
flake8-formatter-abspath = "==1.0.1"
docker = '==5.0.0'
moto = {extras = ["server","s3","sqs","lambda","dynamodb","cloudformation", "sns", "batch", "ec2", "rds"],version = "==2.0.8"}
moto = {extras = ["server","s3","sqs","lambda","dynamodb","cloudformation", "sns", "batch", "ec2", "rds"],version = "~=2.2.19"}
pytest = "==6.2.4"
pytest-cov = "==2.11.1"
pytest-asyncio = "==0.14.0"
Expand Down
2 changes: 1 addition & 1 deletion aiobotocore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@

__all__ = ['get_session', 'AioSession']

__version__ = '2.0.1'
__version__ = '2.1.0'
13 changes: 10 additions & 3 deletions aiobotocore/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ async def create_client(self, service_name, region_name, is_secure=True,
service_name = first_non_none_response(responses, default=service_name)
service_model = self._load_service_model(service_name, api_version)
cls = await self._create_client_class(service_name, service_model)
region_name, client_config = self._normalize_fips_region(
region_name, client_config)
endpoint_bridge = ClientEndpointBridge(
self._endpoint_resolver, scoped_config, client_config,
service_signing_name=service_model.metadata.get('signingName'))
service_signing_name=service_model.metadata.get('signingName'),
config_store=self._config_store)
client_args = self._get_client_args(
service_model, region_name, is_secure, endpoint_url,
verify, credentials, scoped_config, client_config, endpoint_bridge)
Expand All @@ -39,10 +42,12 @@ async def create_client(self, service_name, region_name, is_secure=True,
self._register_s3_events(
service_client, endpoint_bridge, endpoint_url, client_config,
scoped_config)
self._register_s3_control_events(
service_client, endpoint_bridge, endpoint_url, client_config,
scoped_config)
self._register_endpoint_discovery(
service_client, endpoint_url, client_config
)
self._register_lazy_block_unknown_fips_pseudo_regions(service_client)
return service_client

async def _create_client_class(self, service_name, service_model):
Expand Down Expand Up @@ -91,12 +96,14 @@ def _register_s3_events(self, client, endpoint_bridge, endpoint_url,
return
AioS3RegionRedirector(endpoint_bridge, client).register()
S3ArnParamHandler().register(client.meta.events)
use_fips_endpoint = client.meta.config.use_fips_endpoint
S3EndpointSetter(
endpoint_resolver=self._endpoint_resolver,
region=client.meta.region_name,
s3_config=client.meta.config.s3,
endpoint_url=endpoint_url,
partition=client.meta.partition
partition=client.meta.partition,
use_fips_endpoint=use_fips_endpoint
).register(client.meta.events)
self._set_s3_presign_signature_version(
client.meta, client_config, scoped_config)
Expand Down
35 changes: 20 additions & 15 deletions aiobotocore/endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

import aiohttp.http_exceptions
from botocore.endpoint import EndpointCreator, Endpoint, DEFAULT_TIMEOUT, \
MAX_POOL_CONNECTIONS, logger, history_recorder, create_request_object
MAX_POOL_CONNECTIONS, logger, history_recorder, create_request_object, \
is_valid_ipv6_endpoint_url, is_valid_endpoint_url
from botocore.exceptions import ConnectionClosedError
from botocore.hooks import first_non_none_response
from botocore.utils import is_valid_endpoint_url
from urllib3.response import HTTPHeaderDict

from aiobotocore.httpsession import AIOHTTPSession
Expand Down Expand Up @@ -230,19 +230,23 @@ async def _send(self, request):


class AioEndpointCreator(EndpointCreator):
def create_endpoint(self, service_model, region_name, endpoint_url,
verify=None, response_parser_factory=None,
timeout=DEFAULT_TIMEOUT,
max_pool_connections=MAX_POOL_CONNECTIONS,
http_session_cls=AIOHTTPSession,
proxies=None,
socket_options=None,
client_cert=None,
proxies_config=None,
connector_args=None):
if not is_valid_endpoint_url(endpoint_url):

def create_endpoint(
self, service_model, region_name, endpoint_url,
verify=None, response_parser_factory=None,
timeout=DEFAULT_TIMEOUT,
max_pool_connections=MAX_POOL_CONNECTIONS,
http_session_cls=AIOHTTPSession,
proxies=None,
socket_options=None,
client_cert=None, proxies_config=None,
connector_args=None
):
if (
not is_valid_endpoint_url(endpoint_url)
and not is_valid_ipv6_endpoint_url(endpoint_url)
):
raise ValueError("Invalid endpoint: %s" % endpoint_url)

if proxies is None:
proxies = self._get_proxies(endpoint_url)
endpoint_prefix = service_model.endpoint_prefix
Expand All @@ -264,4 +268,5 @@ def create_endpoint(self, service_model, region_name, endpoint_url,
endpoint_prefix=endpoint_prefix,
event_emitter=self._event_emitter,
response_parser_factory=response_parser_factory,
http_session=http_session)
http_session=http_session
)
6 changes: 5 additions & 1 deletion aiobotocore/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import asyncio

import aiohttp.client_exceptions
import wrapt
from botocore.exceptions import IncompleteReadError, ReadTimeoutError
from botocore.response import ResponseStreamingError, IncompleteReadError, \
ReadTimeoutError
from aiobotocore import parsers


Expand Down Expand Up @@ -52,6 +54,8 @@ async def read(self, amt=None):
except asyncio.TimeoutError as e:
raise AioReadTimeoutError(endpoint_url=self.__wrapped__.url,
error=e)
except aiohttp.client_exceptions.ClientConnectionError as e:
raise ResponseStreamingError(error=e)

self._self_amount_read += len(chunk)
if amt is None or (not chunk and amt > 0):
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# NOTE: When updating botocore make sure to update awscli/boto3 versions below
install_requires = [
# pegged to also match items in `extras_require`
'botocore>=1.22.8,<1.22.9',
'botocore>=1.23.24,<1.23.25',
'aiohttp>=3.3.1',
'wrapt>=1.10.10',
'aioitertools>=0.5.1',
Expand All @@ -19,8 +19,8 @@ def read(f):


extras_require = {
'awscli': ['awscli>=1.21.8,<1.21.9'],
'boto3': ['boto3>=1.19.8,<1.19.9'],
'awscli': ['awscli>=1.22.24,<1.22.25'],
'boto3': ['boto3>=1.20.24,<1.20.25'],
}


Expand Down
10 changes: 5 additions & 5 deletions tests/test_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@
ClientArgsCreator.get_client_args: {'a98b0bf9fe62f79b533b87664183c8886bc6816b'},

# client.py
ClientCreator.create_client: {'d18bc3d5d2f09e8ad775f4f1c6211b500a4bce11'},
ClientCreator.create_client: {'5cc47860c371ecd83b2e62c58bef590085cb07e0'},
ClientCreator._create_client_class: {'5e493d069eedbf314e40e12a7886bbdbcf194335'},
ClientCreator._register_endpoint_discovery:
{'2eb9009d83a3999c77ecf2fd3335dab94348182e'},
ClientCreator._get_client_args: {'555e1e41f93df7558c8305a60466681e3a267ef3'},
ClientCreator._register_s3_events: {'da3fc62a131d63964c8daa0f52124b092fd8f1b4'},
ClientCreator._register_s3_events: {'accf68c9e3e45b114310e8c635270ccb5fc4926e'},

BaseClient._make_api_call: {'0c59329d4c8a55b88250b512b5e69239c42246fb'},
BaseClient._make_request: {'033a386f7d1025522bea7f2bbca85edc5c8aafd2'},
Expand All @@ -99,7 +99,7 @@

# config.py
Config.merge: {'c3dd8c3ffe0da86953ceba4a35267dfb79c6a2c8'},
Config: {'e63975f828f8d20e4d739dbdb4d496ec3a3e3dc9'},
Config: {'05ad5de7db3910654b0ded39874552aaf29c4e1d'},

# credentials.py
create_mfa_serial_refresher: {'180b81fc40c91d1cf40de1a28e32ae7d601e1d50'},
Expand Down Expand Up @@ -207,7 +207,7 @@
Endpoint._send: {'644c7e5bb88fecaa0b2a204411f8c7e69cc90bf1'},
Endpoint._add_modeled_error_fields: {'1eefcfacbe9a2c3700c61982e565ce6c4cf1ea3a'},

EndpointCreator.create_endpoint: {'502315533a86991ea5f57c04973ea5c837bf6197'},
EndpointCreator.create_endpoint: {'77a36b0fdc2e4ae7c421849843b93b4dcae5e06f'},

# eventstream.py
EventStream._create_raw_event_generator: {
Expand Down Expand Up @@ -240,7 +240,7 @@
create_parser: {'37e9f1c3b60de17f477a9b79eae8e1acaa7c89d7'},

# response.py
StreamingBody: {'b77bd0903f9013bc47c01f91c6d9bfb8a504d106'},
StreamingBody: {'0c52037e7b46dc2be5fc08fe572fbb2fe280e0af'},
get_response: {'f31b478792a5e0502f142daca881b69955e5c11d'},

# session.py
Expand Down