From 065be8289ec8c0a34ca469af9044e07e15ff931b Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Wed, 21 Mar 2018 20:17:38 -0400 Subject: [PATCH 1/4] Fix the release date --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index ab02c7ad7..a2420c205 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,4 @@ -**9.0.2 (2017-03-16)** +**9.0.2 (2018-03-16)** * Fallback to using SecureTransport on macOS when the linked OpenSSL is too old to support TLSv1.2. From aee9eda0bccea8ffbc6e98dfddf5f88edf85792d Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Wed, 21 Mar 2018 20:27:08 -0400 Subject: [PATCH 2/4] Fix #5081 --- CHANGES.txt | 6 ++++++ pip/_vendor/requests/packages.py | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index a2420c205..9c1450ac9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,9 @@ +**9.0.3 (unreleased)** + +* Fix an error where the vendored requests was not correctly containing itself + to only the internal vendored prefix. + + **9.0.2 (2018-03-16)** * Fallback to using SecureTransport on macOS when the linked OpenSSL is too old diff --git a/pip/_vendor/requests/packages.py b/pip/_vendor/requests/packages.py index cf85b9f7f..9582fa730 100644 --- a/pip/_vendor/requests/packages.py +++ b/pip/_vendor/requests/packages.py @@ -4,11 +4,13 @@ import sys # I don't like it either. Just look the other way. :) for package in ('urllib3', 'idna', 'chardet'): - locals()[package] = __import__("pip._vendor." + package) + vendored_package = "pip._vendor." + package + locals()[package] = __import__(vendored_package) # This traversal is apparently necessary such that the identities are # preserved (requests.packages.urllib3.* is urllib3.*) for mod in list(sys.modules): - if mod == package or mod.startswith(package + '.'): - sys.modules['pip._vendor.requests.packages.' + mod] = sys.modules["pip._vendor." + mod] + if mod == vendored_package or mod.startswith(vendored_package + '.'): + unprefixed_mod = mod[len("pip._vendor."):] + sys.modules['pip._vendor.requests.packages.' + unprefixed_mod] = sys.modules[mod] # Kinda cool, though, right? From a5f7d2b57c236f22960fc30148b72b60ea21908a Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Wed, 21 Mar 2018 20:33:08 -0400 Subject: [PATCH 3/4] Restore 2.6 compatibility --- CHANGES.txt | 2 ++ pip/__init__.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 9c1450ac9..45dd6e776 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,8 @@ * Fix an error where the vendored requests was not correctly containing itself to only the internal vendored prefix. +* Restore compatability with 2.6. + **9.0.2 (2018-03-16)** diff --git a/pip/__init__.py b/pip/__init__.py index ee4abc195..588f90b8a 100755 --- a/pip/__init__.py +++ b/pip/__init__.py @@ -31,7 +31,7 @@ except ImportError: pass else: if (sys.platform == "darwin" and - ssl.OPENSSL_VERSION_NUMBER < 0x1000100f): # OpenSSL 1.0.1 + getattr(ssl, "OPENSSL_VERSION_NUMBER", 0) < 0x1000100f): # OpenSSL 1.0.1 try: from pip._vendor.urllib3.contrib import securetransport except (ImportError, OSError): From ece1c6b189755cef94242fbd1a2fd185e557ec68 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Wed, 21 Mar 2018 20:35:07 -0400 Subject: [PATCH 4/4] Bump for release --- CHANGES.txt | 2 +- pip/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 45dd6e776..436631ad0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,4 @@ -**9.0.3 (unreleased)** +**9.0.3 (2018-03-21)** * Fix an error where the vendored requests was not correctly containing itself to only the internal vendored prefix. diff --git a/pip/__init__.py b/pip/__init__.py index 588f90b8a..c00b284d6 100755 --- a/pip/__init__.py +++ b/pip/__init__.py @@ -58,7 +58,7 @@ import pip.cmdoptions cmdoptions = pip.cmdoptions # The version as used in the setup.py and the docs conf.py -__version__ = "9.0.2" +__version__ = "9.0.3" logger = logging.getLogger(__name__)