Skip to content

Commit 88924a4

Browse files
committed
Fix a mistake in merge
1 parent 0320093 commit 88924a4

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/pip/_vendor/requests/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def check_compatibility(urllib3_version, chardet_version):
8080
RequestsDependencyWarning)
8181

8282
# Attempt to enable urllib3's SNI support, if possible
83-
from pip.compat import WINDOWS
83+
from pip._internal.compat import WINDOWS
8484
if not WINDOWS:
8585
try:
8686
from pip._vendor.urllib3.contrib import pyopenssl

tasks/vendoring/patches/requests.patch

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
diff --git a/src/pip/_vendor/requests/packages.py b/src/pip/_vendor/requests/packages.py
2+
index 7232fe0f..6336a07d 100644
3+
--- a/src/pip/_vendor/requests/packages.py
4+
+++ b/src/pip/_vendor/requests/packages.py
5+
@@ -4,7 +4,7 @@ import sys
6+
# I don't like it either. Just look the other way. :)
7+
8+
for package in ('urllib3', 'idna', 'chardet'):
9+
- locals()[package] = __import__(package)
10+
+ locals()[package] = __import__("pip._vendor." + package)
11+
# This traversal is apparently necessary such that the identities are
12+
# preserved (requests.packages.urllib3.* is urllib3.*)
13+
for mod in list(sys.modules):
14+
115
diff --git a/pip/_vendor/requests/__init__.py b/pip/_vendor/requests/__init__.py
216
index 9c3b769..36a4ef40 100644
317
--- a/src/pip/_vendor/requests/__init__.py
@@ -11,7 +25,7 @@ index 9c3b769..36a4ef40 100644
1125
- pyopenssl.inject_into_urllib3()
1226
-except ImportError:
1327
- pass
14-
+from pip.compat import WINDOWS
28+
+from pip._internal.compat import WINDOWS
1529
+if not WINDOWS:
1630
+ try:
1731
+ from pip._vendor.urllib3.contrib import pyopenssl

0 commit comments

Comments
 (0)