diff --git a/CHANGES.rst b/CHANGES.rst index 6d5c7e24..6b8ce685 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,9 @@ Changes ------- +2.5.2 (2023-07-06) +^^^^^^^^^^^^^^^^^^ +* fix issue #1020 + 2.5.1 (2023-06-27) ^^^^^^^^^^^^^^^^^^ * bump botocore to 1.29.161 diff --git a/aiobotocore/__init__.py b/aiobotocore/__init__.py index b8c54948..3bfa1a62 100644 --- a/aiobotocore/__init__.py +++ b/aiobotocore/__init__.py @@ -1 +1 @@ -__version__ = '2.5.1' +__version__ = '2.5.2' diff --git a/aiobotocore/config.py b/aiobotocore/config.py index 0da0e8e7..8d7cc6e1 100644 --- a/aiobotocore/config.py +++ b/aiobotocore/config.py @@ -15,7 +15,7 @@ def __init__(self, connector_args=None, **kwargs): if 'keepalive_timeout' not in self.connector_args: # AWS has a 20 second idle timeout: - # https://forums.aws.amazon.com/message.jspa?messageID=215367 + # https://web.archive.org/web/20150926192339/https://forums.aws.amazon.com/message.jspa?messageID=215367 # and aiohttp default timeout is 30s so we set it to something # reasonable here self.connector_args['keepalive_timeout'] = 12 diff --git a/aiobotocore/credentials.py b/aiobotocore/credentials.py index 440e2d4a..5e535ac8 100644 --- a/aiobotocore/credentials.py +++ b/aiobotocore/credentials.py @@ -52,6 +52,7 @@ ) from dateutil.tz import tzutc +from aiobotocore._helpers import resolve_awaitable from aiobotocore.config import AioConfig from aiobotocore.tokens import AioSSOTokenProvider from aiobotocore.utils import ( @@ -324,7 +325,8 @@ async def _refresh(self): async def _protected_refresh(self, is_mandatory): try: - metadata = await self._refresh_using() + # AioEnvProvider._create_credentials_fetcher is not and does not need async + metadata = await resolve_awaitable(self._refresh_using()) except Exception: period_name = 'mandatory' if is_mandatory else 'advisory' logger.warning( @@ -436,6 +438,7 @@ async def _create_client(self): ) +# black: # fmt: skip (ing) this line triggers internal black error class AioAssumeRoleWithWebIdentityCredentialFetcher( AioBaseAssumeRoleCredentialFetcher ): diff --git a/aiobotocore/httpsession.py b/aiobotocore/httpsession.py index 5ae222f4..b98c59ed 100644 --- a/aiobotocore/httpsession.py +++ b/aiobotocore/httpsession.py @@ -80,7 +80,7 @@ def __init__( self._connector_args = connector_args if self._connector_args is None: # AWS has a 20 second idle timeout: - # https://forums.aws.amazon.com/message.jspa?messageID=215367 + # https://web.archive.org/web/20150926192339/https://forums.aws.amazon.com/message.jspa?messageID=215367 # aiohttp default timeout is 30s so set something reasonable here self._connector_args = dict(keepalive_timeout=12)