Skip to content

Commit

Permalink
fix issue #1020 (#1022)
Browse files Browse the repository at this point in the history
  • Loading branch information
thehesiod authored Jul 7, 2023
1 parent 5ce00b8 commit 0f5447b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -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
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.5.1'
__version__ = '2.5.2'
2 changes: 1 addition & 1 deletion aiobotocore/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion aiobotocore/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -436,6 +438,7 @@ async def _create_client(self):
)


# black: # fmt: skip (ing) this line triggers internal black error
class AioAssumeRoleWithWebIdentityCredentialFetcher(
AioBaseAssumeRoleCredentialFetcher
):
Expand Down
2 changes: 1 addition & 1 deletion aiobotocore/httpsession.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 0f5447b

Please sign in to comment.