Skip to content

Commit

Permalink
bump botocore dependency specification
Browse files Browse the repository at this point in the history
  • Loading branch information
jakob-keller committed Nov 23, 2023
1 parent 54181aa commit ef693f0
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Changes
-------

2.8.0 (2023-11-18)
2.8.0 (2023-11-23)
^^^^^^^^^^^^^^^^^^
* add AioStubber that returns AioAWSResponse()
* remove confusing `aiobotocore.session.Session` symbol
Expand Down
3 changes: 3 additions & 0 deletions aiobotocore/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def create_credential_resolver(session, cache=None, region_name=None):
session
),
'ec2_credential_refresh_window': _DEFAULT_ADVISORY_REFRESH_TIMEOUT,
'ec2_metadata_v1_disabled': session.get_config_variable(
'ec2_metadata_v1_disabled'
),
}

if cache is None:
Expand Down
11 changes: 9 additions & 2 deletions aiobotocore/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ def __init__(

if env is None:
env = os.environ.copy()
self._disabled = env.get('AWS_EC2_METADATA_DISABLED', 'false').lower()
self._disabled = self._disabled == 'true'
self._disabled = (
env.get('AWS_EC2_METADATA_DISABLED', 'false').lower() == 'true'
)
self._imds_v1_disabled = config.get('ec2_metadata_v1_disabled')
self._user_agent = user_agent

self._session = session or _RefCountedSession(
Expand Down Expand Up @@ -144,6 +146,8 @@ async def _fetch_metadata_token(self):

async def _get_request(self, url_path, retry_func, token=None):
self._assert_enabled()
if not token:
self._assert_v1_enabled()
if retry_func is None:
retry_func = self._default_retry
url = self._construct_url(url_path)
Expand Down Expand Up @@ -303,6 +307,9 @@ def _create_fetcher(self):
'ec2_metadata_service_endpoint_mode': resolve_imds_endpoint_mode(
self._session
),
'ec2_metadata_v1_disabled': self._session.get_config_variable(
'ec2_metadata_v1_disabled'
),
}
fetcher = AioInstanceMetadataRegionFetcher(
timeout=metadata_timeout,
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.32.0,<1.32.4',
'botocore>=1.32.4,<1.32.7',
'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.30.0,<1.30.4'],
'boto3': ['boto3>=1.29.0,<1.29.4'],
'awscli': ['awscli>=1.30.4,<1.30.7'],
'boto3': ['boto3>=1.29.4,<1.29.7'],
}


Expand Down
14 changes: 10 additions & 4 deletions tests/test_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,9 @@
},
BotoProvider.load: {'e84ebfe3d6698dc4683f0f6699d4a9907c87bebb'},
OriginalEC2Provider.load: {'dc58cd1c79d177105b183a2d20e1154e6f8f0733'},
create_credential_resolver: {'f3501ad2330afe5e1ef4e71c7537f94885c73821'},
create_credential_resolver: {
'fe797afd33126be87f86e44ab20475d50d727a4e',
},
get_credentials: {'ff0c735a388ac8dd7fe300a32c1e36cdf33c0f56'},
# configprovider.py
SmartDefaultsConfigStoreFactory.merge_smart_defaults: {
Expand Down Expand Up @@ -487,8 +489,12 @@
ContainerMetadataFetcher._get_response: {
'b2c2fe2d74ce1894168e8e052c4e97cc70539b1a',
},
IMDSFetcher.__init__: {'e7e62b79f6a9e4cb14120e61c4516f0a61148100'},
IMDSFetcher._get_request: {'7f8ad4724ac08300a0c55e307bfeb5abc0579d26'},
IMDSFetcher.__init__: {
'50ea982d3b94d7301d39480f827cfc1502800cb4',
},
IMDSFetcher._get_request: {
'118354ef768da5a7402d5d2bf6f55b4fbb2525e4',
},
IMDSFetcher._fetch_metadata_token: {
'12225b35a73130632038785a8c2e6fbaaf9de1f4'
},
Expand Down Expand Up @@ -541,7 +547,7 @@
'4631ced79cff143de5d3fdf03cd69720778f141b'
},
IMDSRegionProvider._create_fetcher: {
'7031d7cdaea0244a5d860f2f8f6c013e25578123'
'18da52c786a20d91615258a8127b566688ecbb39',
},
# waiter.py
NormalizedOperationMethod.__call__: {
Expand Down

0 comments on commit ef693f0

Please sign in to comment.