Skip to content

Commit 6e2391a

Browse files
authored
Merge pull request #4712 from dstufft/upgrade
Upgrade our Vendored Dependencies
2 parents d1379fa + 13a3f1d commit 6e2391a

File tree

134 files changed

+6284
-1293
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+6284
-1293
lines changed

news/cachecontrol.vendor

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Upgraded CacheControl to 0.12.2.
1+
Upgraded CacheControl to 0.12.3.

news/certifi.vendor

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Vendored certifi at 2017.7.27.1.

news/chardet.vendor

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Vendored chardet at 3.0.4.

news/idna.vendor

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Vendored idna at idna==2.6.

news/pytoml.vendor

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgraded pytoml to 0.1.14.

news/requests.vendor

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Upgraded requests to 2.14.2.
1+
Upgraded requests to 2.18.4.

news/setuptools.vendor

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Upgraded pkg_resources (via setuptools) to 36.2.6.
1+
Upgraded pkg_resources (via setuptools) to 36.4.0.

news/urllib3.vendor

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Vendored urllib3 at 1.22.

src/pip/_internal/__init__.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# to add socks as yet another dependency for pip, nor do I want to allow-stder
1818
# in the DEP-8 tests, so just suppress the warning. pdb tells me this has to
1919
# be done before the import of pip.vcs.
20-
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
20+
from pip._vendor.urllib3.exceptions import DependencyWarning
2121
warnings.filterwarnings("ignore", category=DependencyWarning) # noqa
2222

2323
# We want to inject the use of SecureTransport as early as possible so that any
@@ -32,9 +32,7 @@
3232
if (sys.platform == "darwin" and
3333
ssl.OPENSSL_VERSION_NUMBER < 0x1000100f): # OpenSSL 1.0.1
3434
try:
35-
from pip._vendor.requests.packages.urllib3.contrib import (
36-
securetransport,
37-
)
35+
from pip._vendor.urllib3.contrib import securetransport
3836
except (ImportError, OSError):
3937
pass
4038
else:
@@ -51,9 +49,7 @@
5149
)
5250
from pip._internal.commands import get_summaries, get_similar_commands
5351
from pip._internal.commands import commands_dict
54-
from pip._vendor.requests.packages.urllib3.exceptions import (
55-
InsecureRequestWarning,
56-
)
52+
from pip._vendor.urllib3.exceptions import InsecureRequestWarning
5753

5854
logger = logging.getLogger(__name__)
5955

src/pip/_internal/download.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@
1212
import shutil
1313
import sys
1414

15-
from pip._vendor import requests, six
15+
from pip._vendor import requests, six, urllib3
1616
from pip._vendor.cachecontrol import CacheControlAdapter
1717
from pip._vendor.cachecontrol.caches import FileCache
1818
from pip._vendor.lockfile import LockError
1919
from pip._vendor.requests.adapters import BaseAdapter, HTTPAdapter
2020
from pip._vendor.requests.auth import AuthBase, HTTPBasicAuth
2121
from pip._vendor.requests.models import CONTENT_CHUNK_SIZE, Response
22-
from pip._vendor.requests.packages import urllib3
2322
from pip._vendor.requests.structures import CaseInsensitiveDict
2423
from pip._vendor.requests.utils import get_netrc_auth
2524
# NOTE: XMLRPC Client is not annotated in typeshed as on 2017-07-17, which is

src/pip/_vendor/cachecontrol/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55
__author__ = 'Eric Larson'
66
__email__ = '[email protected]'
7-
__version__ = '0.12.2'
7+
__version__ = '0.12.3'
88

99
from .wrapper import CacheControl
1010
from .adapter import CacheControlAdapter

src/pip/_vendor/cachecontrol/caches/file_cache.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
FileNotFoundError
1010
except NameError:
1111
# py2.X
12-
FileNotFoundError = IOError
12+
FileNotFoundError = OSError
1313

1414

1515
def _secure_open_write(filename, fmode):

src/pip/_vendor/cachecontrol/compat.py

+11-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,17 @@
1010
import pickle
1111

1212

13-
from pip._vendor.requests.packages.urllib3.response import HTTPResponse
14-
from pip._vendor.requests.packages.urllib3.util import is_fp_closed
13+
# Handle the case where the requests module has been patched to not have
14+
# urllib3 bundled as part of its source.
15+
try:
16+
from pip._vendor.requests.packages.urllib3.response import HTTPResponse
17+
except ImportError:
18+
from pip._vendor.urllib3.response import HTTPResponse
19+
20+
try:
21+
from pip._vendor.requests.packages.urllib3.util import is_fp_closed
22+
except ImportError:
23+
from pip._vendor.urllib3.util import is_fp_closed
1524

1625
# Replicate some six behaviour
1726
try:

src/pip/_vendor/certifi.pyi

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from certifi import *

src/pip/_vendor/certifi/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .core import where, old_where
2+
3+
__version__ = "2017.07.27.1"

src/pip/_vendor/certifi/__main__.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from certifi import where
2+
print(where())

src/pip/_vendor/requests/cacert.pem renamed to src/pip/_vendor/certifi/cacert.pem

-826
Large diffs are not rendered by default.

src/pip/_vendor/certifi/core.py

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
4+
"""
5+
certifi.py
6+
~~~~~~~~~~
7+
8+
This module returns the installation location of cacert.pem.
9+
"""
10+
import os
11+
import warnings
12+
13+
14+
class DeprecatedBundleWarning(DeprecationWarning):
15+
"""
16+
The weak security bundle is being deprecated. Please bother your service
17+
provider to get them to stop using cross-signed roots.
18+
"""
19+
20+
21+
def where():
22+
f = os.path.dirname(__file__)
23+
24+
return os.path.join(f, 'cacert.pem')
25+
26+
27+
def old_where():
28+
warnings.warn(
29+
"The weak security bundle is being deprecated.",
30+
DeprecatedBundleWarning
31+
)
32+
f = os.path.dirname(__file__)
33+
return os.path.join(f, 'weak.pem')
34+
35+
if __name__ == '__main__':
36+
print(where())

0 commit comments

Comments
 (0)