Skip to content

Commit

Permalink
Support up-to-date botocore (#1115)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakob-keller authored May 16, 2024
1 parent ea86e2b commit 2d6520b
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changes
-------

2.12.4 (2024-05-16)
^^^^^^^^^^^^^^^^^^^
* bump botocore dependency specification

2.12.3 (2024-04-11)
^^^^^^^^^^^^^^^^^^^
* relax botocore dependency specification
Expand Down
2 changes: 1 addition & 1 deletion aiobotocore/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.12.3'
__version__ = '2.12.4'
3 changes: 3 additions & 0 deletions aiobotocore/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ def _register_s3_events(
self._set_s3_presign_signature_version(
client.meta, client_config, scoped_config
)
client.meta.events.register(
'before-parameter-build.s3', self._inject_s3_input_parameters
)

def _get_client_args(
self,
Expand Down
13 changes: 11 additions & 2 deletions aiobotocore/signers.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ async def sign(
kwargs['region_name'] = signing_context['region']
if signing_context.get('signing_name'):
kwargs['signing_name'] = signing_context['signing_name']
if signing_context.get('request_credentials'):
kwargs['request_credentials'] = signing_context[
'request_credentials'
]
if signing_context.get('identity_cache') is not None:
self._resolve_identity_cache(
kwargs,
Expand Down Expand Up @@ -129,7 +133,12 @@ async def _choose_signer(self, operation_name, signing_type, context):
return signature_version

async def get_auth_instance(
self, signing_name, region_name, signature_version=None, **kwargs
self,
signing_name,
region_name,
signature_version=None,
request_credentials=None,
**kwargs,
):
if signature_version is None:
signature_version = self._signature_version
Expand All @@ -147,7 +156,7 @@ async def get_auth_instance(
auth = cls(frozen_token)
return auth

credentials = self._credentials
credentials = request_credentials or self._credentials
if getattr(cls, "REQUIRES_IDENTITY_CACHE", None) is True:
cache = kwargs["identity_cache"]
key = kwargs["cache_key"]
Expand Down
6 changes: 3 additions & 3 deletions requirements-dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ coverage==7.2.7
docker~=6.1.3
moto[server,s3,sqs,lambda,dynamodb,cloudformation,sns,batch,ec2,rds]~=4.2.9
pre-commit~=3.5.0
pytest==7.4.0
pytest-cov==4.1.0
pytest==8.1.1
pytest-cov==5.0.0
pytest-asyncio~=0.21.1
pytest-xdist==3.3.1
pytest-xdist==3.5.0
setuptools==67.8.0;python_version>="3.12"

# this is needed for test_patches
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.34.41,<1.34.70',
'botocore>=1.34.70,<1.34.107',
'aiohttp>=3.7.4.post0,<4.0.0',
'wrapt>=1.10.10, <2.0.0',
'aioitertools>=0.5.1,<1.0.0',
]

extras_require = {
'awscli': ['awscli>=1.32.41,<1.32.70'],
'boto3': ['boto3>=1.34.41,<1.34.70'],
'awscli': ['awscli>=1.32.70,<1.32.107'],
'boto3': ['boto3>=1.34.70,<1.34.107'],
}


Expand Down
6 changes: 3 additions & 3 deletions tests/test_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
'716c1549989eef6bbd048bf4f134c1b4659e124a',
},
ClientCreator._register_s3_events: {
'5659a5312caeb3ea97d663d837d6d201f08824f2'
'4ab15da7cb36fa795f64154581a970b0966fdf50',
},
ClientCreator._register_retries: {
'16d3064142e5f9e45b0094bbfabf7be30183f255'
Expand Down Expand Up @@ -446,11 +446,11 @@
# signers.py
RequestSigner.handler: {'371909df136a0964ef7469a63d25149176c2b442'},
RequestSigner.sign: {
'8b6ca96055e5546a6572ad790d5af74a23bc0b52',
'2f1f45a6fcfcca1be2c5e292c9e1b80453e7fa57',
},
RequestSigner.get_auth: {'4f8099bef30f9a72fa3bcaa1bd3d22c4fbd224a8'},
RequestSigner.get_auth_instance: {
'dcd41ea686506dcf056d8252ccf73acd501efd2b',
'b78756b9d4f7a5bce9630195d761bab557677225',
},
RequestSigner._choose_signer: {'bd0e9784029b8aa182b5aec73910d94cb67c36b0'},
RequestSigner.generate_presigned_url: {
Expand Down

0 comments on commit 2d6520b

Please sign in to comment.