summaryrefslogtreecommitdiff
path: root/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/packages.py
diff options
context:
space:
mode:
authorShubham Saini <shubham6405@gmail.com>2018-12-11 10:01:23 +0000
committerShubham Saini <shubham6405@gmail.com>2018-12-11 10:01:23 +0000
commit68df54d6629ec019142eb149dd037774f2d11e7c (patch)
tree345bc22d46b4e01a4ba8303b94278952a4ed2b9e /venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/packages.py
First commit
Diffstat (limited to 'venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/packages.py')
-rw-r--r--venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/packages.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/packages.py b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/packages.py
new file mode 100644
index 0000000..c91d9c7
--- /dev/null
+++ b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/packages.py
@@ -0,0 +1,16 @@
1import sys
2
3# This code exists for backwards compatibility reasons.
4# I don't like it either. Just look the other way. :)
5
6for package in ('urllib3', 'idna', 'chardet'):
7 vendored_package = "pip._vendor." + package
8 locals()[package] = __import__(vendored_package)
9 # This traversal is apparently necessary such that the identities are
10 # preserved (requests.packages.urllib3.* is urllib3.*)
11 for mod in list(sys.modules):
12 if mod == vendored_package or mod.startswith(vendored_package + '.'):
13 unprefixed_mod = mod[len("pip._vendor."):]
14 sys.modules['pip._vendor.requests.packages.' + unprefixed_mod] = sys.modules[mod]
15
16# Kinda cool, though, right?