From 4020c1ed87930bc17142d782da7a12a42659500d Mon Sep 17 00:00:00 2001 From: Alexander Mohr Date: Wed, 7 Jul 2021 14:53:40 -0700 Subject: [PATCH] bump botocore (#871) --- CHANGES.rst | 4 ++++ aiobotocore/__init__.py | 2 +- aiobotocore/client.py | 1 + aiobotocore/endpoint.py | 10 ++++++++++ setup.py | 6 +++--- tests/test_patches.py | 2 +- 6 files changed, 20 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 3ab48849..8d387eba 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,9 @@ Changes ------- +1.3.2 (2021-07-07) +^^^^^^^^^^^^^^^^^^ +* Bump to botocore 1.20.106 + 1.3.1 (2021-06-11) ^^^^^^^^^^^^^^^^^^ * TCPConnector: change deprecated ssl_context to ssl diff --git a/aiobotocore/__init__.py b/aiobotocore/__init__.py index f8bccad7..c5cd6d87 100644 --- a/aiobotocore/__init__.py +++ b/aiobotocore/__init__.py @@ -1,4 +1,4 @@ from .session import get_session, AioSession __all__ = ['get_session', 'AioSession'] -__version__ = '1.3.1' +__version__ = '1.3.2' diff --git a/aiobotocore/client.py b/aiobotocore/client.py index c7ecf21c..11dc1510 100644 --- a/aiobotocore/client.py +++ b/aiobotocore/client.py @@ -43,6 +43,7 @@ async def create_client(self, service_name, region_name, is_secure=True, self._register_endpoint_discovery( service_client, endpoint_url, client_config ) + self._register_lazy_block_unknown_fips_pseudo_regions(service_client) return service_client async def _create_client_class(self, service_name, service_model): diff --git a/aiobotocore/endpoint.py b/aiobotocore/endpoint.py index bf7c6168..0ae52dbd 100644 --- a/aiobotocore/endpoint.py +++ b/aiobotocore/endpoint.py @@ -2,7 +2,9 @@ import asyncio import io import pathlib +import os import ssl +import sys import aiohttp.http_exceptions from aiohttp.client import URL from botocore.endpoint import EndpointCreator, Endpoint, DEFAULT_TIMEOUT, \ @@ -305,6 +307,14 @@ def create_endpoint(self, service_model, region_name, endpoint_url, ssl_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH, cafile=str(verify)) + if ssl_context: + # Enable logging of TLS session keys via defacto standard environment variable # noqa: E501 + # 'SSLKEYLOGFILE', if the feature is available (Python 3.8+). Skip empty values. # noqa: E501 + if hasattr(ssl_context, 'keylog_filename'): + keylogfile = os.environ.get('SSLKEYLOGFILE') + if keylogfile and not sys.flags.ignore_environment: + ssl_context.keylog_filename = keylogfile + # TODO: add support for proxies_config connector = aiohttp.TCPConnector( diff --git a/setup.py b/setup.py index ae3e72b0..216db2bc 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ # NOTE: When updating botocore make sure to update awscli/boto3 versions below install_requires = [ # pegged to also match items in `extras_require` - 'botocore>=1.20.49,<1.20.50', + 'botocore>=1.20.106,<1.20.107', 'aiohttp>=3.3.1', 'wrapt>=1.10.10', 'aioitertools>=0.5.1', @@ -19,8 +19,8 @@ def read(f): extras_require = { - 'awscli': ['awscli==1.19.49'], - 'boto3': ['boto3==1.17.49'], + 'awscli': ['awscli>=1.19.106,<1.19.107'], + 'boto3': ['boto3>=1.17.106,<1.17.107'], } diff --git a/tests/test_patches.py b/tests/test_patches.py index cf82e098..9b6f5cd0 100644 --- a/tests/test_patches.py +++ b/tests/test_patches.py @@ -79,7 +79,7 @@ ClientArgsCreator.get_client_args: {'96d97f97fce6d883281dc4ffe0fa0743e190f7bd'}, # client.py - ClientCreator.create_client: {'281fbf7afc4e6282e5c881c7a03717c9e5e4e176'}, + ClientCreator.create_client: {'d18bc3d5d2f09e8ad775f4f1c6211b500a4bce11'}, ClientCreator._create_client_class: {'5e493d069eedbf314e40e12a7886bbdbcf194335'}, ClientCreator._get_client_args: {'555e1e41f93df7558c8305a60466681e3a267ef3'}, ClientCreator._register_s3_events: {'da3fc62a131d63964c8daa0f52124b092fd8f1b4'},