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.31.17 #1029

Merged
merged 1 commit into from
Aug 7, 2023
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
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Changes
2.5.3 (TBD)
^^^^^^^^^^^^^^^^^^
* add more support for Python 3.11
* bump botocore to 1.31.17

2.5.2 (2023-07-06)
^^^^^^^^^^^^^^^^^^
Expand Down
11 changes: 10 additions & 1 deletion aiobotocore/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def get_client_args(
s3_config = final_args['s3_config']
partition = endpoint_config['metadata'].get('partition', None)
socket_options = final_args['socket_options']
configured_endpoint_url = final_args['configured_endpoint_url']

signing_region = endpoint_config['signing_region']
endpoint_region_name = endpoint_config['region_name']
Expand Down Expand Up @@ -99,13 +100,20 @@ def get_client_args(
service_model,
endpoint_region_name,
region_name,
endpoint_url,
configured_endpoint_url,
endpoint,
is_secure,
endpoint_bridge,
event_emitter,
)

# Copy the session's user agent factory and adds client configuration.
client_ua_creator = self._session_ua_creator.with_client_config(
new_config
)
supplied_ua = client_config.user_agent if client_config else None
new_config._supplied_user_agent = supplied_ua

return {
'serializer': serializer,
'endpoint': endpoint,
Expand All @@ -118,6 +126,7 @@ def get_client_args(
'partition': partition,
'exceptions_factory': self._exceptions_factory,
'endpoint_ruleset_resolver': ruleset_resolver,
'user_agent_creator': client_ua_creator,
}

def _build_endpoint_resolver(
Expand Down
7 changes: 6 additions & 1 deletion aiobotocore/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
logger,
resolve_checksum_context,
)
from botocore.compress import maybe_compress_request
from botocore.discovery import block_endpoint_discovery_required_operations
from botocore.exceptions import OperationNotPageableError, UnknownServiceError
from botocore.history import get_global_history_recorder
Expand Down Expand Up @@ -261,6 +262,7 @@ def _get_client_args(
self._loader,
self._exceptions_factory,
config_store=self._config_store,
user_agent_creator=self._user_agent_creator,
)
return args_creator.get_client_args(
service_model,
Expand Down Expand Up @@ -357,6 +359,9 @@ async def _make_api_call(self, operation_name, api_params):
if event_response is not None:
http, parsed_response = event_response
else:
maybe_compress_request(
self.meta.config, request_dict, operation_model
)
apply_request_checksum(request_dict)
http, parsed_response = await self._make_request(
operation_model, request_dict, request_context
Expand Down Expand Up @@ -414,7 +419,7 @@ async def _convert_to_request_dict(
if headers is not None:
request_dict['headers'].update(headers)
if set_user_agent_header:
user_agent = self._client_config.user_agent
user_agent = self._user_agent_creator.to_string()
else:
user_agent = None
prepare_request_dict(
Expand Down
17 changes: 15 additions & 2 deletions aiobotocore/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,28 @@ async def _create_client(
auth_token = self.get_auth_token()
endpoint_resolver = self._get_internal_component('endpoint_resolver')
exceptions_factory = self._get_internal_component('exceptions_factory')
config_store = self.get_component('config_store')
config_store = copy.copy(self.get_component('config_store'))
user_agent_creator = self.get_component('user_agent_creator')
# Session configuration values for the user agent string are applied
# just before each client creation because they may have been modified
# at any time between session creation and client creation.
user_agent_creator.set_session_config(
session_user_agent_name=self.user_agent_name,
session_user_agent_version=self.user_agent_version,
session_user_agent_extra=self.user_agent_extra,
)
defaults_mode = self._resolve_defaults_mode(config, config_store)
if defaults_mode != 'legacy':
smart_defaults_factory = self._get_internal_component(
'smart_defaults_factory'
)
config_store = copy.deepcopy(config_store)
await smart_defaults_factory.merge_smart_defaults(
config_store, defaults_mode, region_name
)
self._add_configured_endpoint_provider(
client_name=service_name,
config_store=config_store,
)
client_creator = AioClientCreator(
loader,
endpoint_resolver,
Expand All @@ -194,6 +206,7 @@ async def _create_client(
response_parser_factory,
exceptions_factory,
config_store,
user_agent_creator=user_agent_creator,
)
client = await client_creator.create_client(
service_name=service_name,
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
# NOTE: When updating botocore make sure to update awscli/boto3 versions below
install_requires = [
# pegged to also match items in `extras_require`
'botocore>=1.29.161,<1.29.162',
'botocore>=1.31.17,<1.31.18',
'aiohttp>=3.3.1,<4.0.0',
'wrapt>=1.10.10, <2.0.0',
'aioitertools>=0.5.1,<1.0.0',
]

extras_require = {
'awscli': ['awscli>=1.27.161,<1.27.162'],
'boto3': ['boto3>=1.26.161,<1.26.162'],
'awscli': ['awscli>=1.29.17,<1.29.18'],
'boto3': ['boto3>=1.28.17,<1.28.18'],
}


Expand Down
12 changes: 6 additions & 6 deletions tests/test_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
_API_DIGESTS = {
# args.py
ClientArgsCreator.get_client_args: {
'63f26e3225338f285b98a4fe9bdcd1057a0f61b2'
'2dc13a6f32c470bc415a2cfc1f82cf569b1a5196'
},
ClientArgsCreator._build_endpoint_resolver: {
'9aa226b8d6f09f7270633b8cc35bc82a15386ee4'
Expand All @@ -161,7 +161,7 @@
'483c6c8e035810d1b76110fc1956de76943c2f18'
},
ClientCreator._get_client_args: {
'86edebe5bc72e89e75c593e8f4bf2a3c358f1d8f'
'd5e19b1e62f64a745de842963c2472825a66e854'
},
ClientCreator._register_s3_events: {
'5659a5312caeb3ea97d663d837d6d201f08824f2'
Expand All @@ -178,10 +178,10 @@
ClientCreator._register_legacy_retries: {
'000b2f2a122602e2e741ec2e89308dc2e2b67329'
},
BaseClient._make_api_call: {'eba7540893a631a00ebfc3c287026ee6db993e09'},
BaseClient._make_api_call: {'ea961baa7ea0b1a9b8318a3638b970e38ba4ac76'},
BaseClient._make_request: {'cfd8bbf19ea132134717cdf9c460694ddacdbf58'},
BaseClient._convert_to_request_dict: {
'899c223cacbe17be646a33882ecd65aa02290b9b'
'5e0a374926b6ee1a8715963ab551e126506e7fc9'
},
BaseClient._emit_api_params: {'abd67874dae8d5cd2788412e4699398cb915a119'},
BaseClient._resolve_endpoint_ruleset: {
Expand All @@ -192,7 +192,7 @@
BaseClient.__getattr__: {'3ec17f468f50789fa633d6041f40b66a2f593e77'},
# config.py
Config.merge: {'c3dd8c3ffe0da86953ceba4a35267dfb79c6a2c8'},
Config: {'c22f76d2e45e575d99ae130cdba8ea31cb7f4cdc'},
Config: {'4153fcb2ddf68b86f3774da1016b9cbfa1659b0b'},
# credentials.py
create_mfa_serial_refresher: {'9b5e98782fcacdcea5899a6d0d29d1b9de348bb0'},
Credentials.get_frozen_credentials: {
Expand Down Expand Up @@ -421,7 +421,7 @@
Session._register_response_parser_factory: {
'bb8f7f3cc4d9ff9551f0875604747c4bb5030ff6'
},
Session.create_client: {'8b1bd136aba5d0e519816aca7354b3d1e2dee7ec'},
Session.create_client: {'a821ae3870f33b65b1ea7cd347ca0497ed306ccd'},
Session._create_token_resolver: {
'142df7a219db0dd9c96fd81dc9e84a764a2fe5fb'
},
Expand Down
Loading