diff --git a/CHANGES.md b/CHANGES.md index 9cc631e..123e465 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,7 +7,12 @@ * Update diskcache_py3 5.0.1 (9670fbb) to 5.1.0 (40ce0de) * Update diskcache_py2 4.1.0 (b0451e0) from 5.1.0 (40ce0de) * Update Requests library 2.24.0 (2f70990) to 2.25.0 (03957eb) -* Update urllib3 1.25.11 (00f1769) to 1.26.1 (7675532) +* Update urllib3 1.25.11 (00f1769) to 1.26.2 (eae04d6) + + +[develop changelog] + +* Update urllib3 1.26.1 (7675532) to 1.26.2 (eae04d6) ### 0.23.0 (2020-11-11 13:30:00 UTC) diff --git a/lib/urllib3/_version.py b/lib/urllib3/_version.py index cd4e7b0..2dba29e 100644 --- a/lib/urllib3/_version.py +++ b/lib/urllib3/_version.py @@ -1,2 +1,2 @@ # This file is protected via CODEOWNERS -__version__ = "1.26.1" +__version__ = "1.26.2" diff --git a/lib/urllib3/util/ssl_.py b/lib/urllib3/util/ssl_.py index 1cb5e7c..e4b5df7 100644 --- a/lib/urllib3/util/ssl_.py +++ b/lib/urllib3/util/ssl_.py @@ -44,13 +44,21 @@ _const_compare_digest = getattr(hmac, "compare_digest", _const_compare_digest_ba try: # Test for SSL features import ssl - from ssl import HAS_SNI # Has SNI? from ssl import CERT_REQUIRED, wrap_socket +except ImportError: + pass + +try: + from ssl import HAS_SNI # Has SNI? +except ImportError: + pass +try: from .ssltransport import SSLTransport except ImportError: pass + try: # Platform-specific: Python 3.6 from ssl import PROTOCOL_TLS @@ -393,7 +401,7 @@ def ssl_wrap_socket( try: if hasattr(context, "set_alpn_protocols"): context.set_alpn_protocols(ALPN_PROTOCOLS) - except NotImplementedError: + except NotImplementedError: # Defensive: in CI, we always have set_alpn_protocols pass # If we detect server_hostname is an IP address then the SNI