diff --git a/CHANGES.rst b/CHANGES.rst index 18e098dd4c..46dab40e94 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,13 @@ Changes ======= +1.26.2 (2020-11-12) +------------------- + +* Fixed an issue where ``wrap_socket`` and ``CERT_REQUIRED`` wouldn't + be imported properly on Python 2.7.8 and earlier (Pull #2052) + + 1.26.1 (2020-11-11) ------------------- diff --git a/src/urllib3/_version.py b/src/urllib3/_version.py index cd4e7b06a4..2dba29e3fb 100644 --- a/src/urllib3/_version.py +++ b/src/urllib3/_version.py @@ -1,2 +1,2 @@ # This file is protected via CODEOWNERS -__version__ = "1.26.1" +__version__ = "1.26.2" diff --git a/src/urllib3/util/ssl_.py b/src/urllib3/util/ssl_.py index 1cb5e7cdc1..236aa8e630 100644 --- a/src/urllib3/util/ssl_.py +++ b/src/urllib3/util/ssl_.py @@ -44,13 +44,21 @@ def _const_compare_digest_backport(a, b): 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