Skip to content

Commit

Permalink
Merge pull request #4712 from dstufft/upgrade
Browse files Browse the repository at this point in the history
Upgrade our Vendored Dependencies
  • Loading branch information
dstufft committed Sep 7, 2017
2 parents d1379fa + 13a3f1d commit 6e2391a
Show file tree
Hide file tree
Showing 134 changed files with 6,284 additions and 1,293 deletions.
2 changes: 1 addition & 1 deletion news/cachecontrol.vendor
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Upgraded CacheControl to 0.12.2.
Upgraded CacheControl to 0.12.3.
1 change: 1 addition & 0 deletions news/certifi.vendor
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Vendored certifi at 2017.7.27.1.
1 change: 1 addition & 0 deletions news/chardet.vendor
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Vendored chardet at 3.0.4.
1 change: 1 addition & 0 deletions news/idna.vendor
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Vendored idna at idna==2.6.
1 change: 1 addition & 0 deletions news/pytoml.vendor
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgraded pytoml to 0.1.14.
2 changes: 1 addition & 1 deletion news/requests.vendor
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Upgraded requests to 2.14.2.
Upgraded requests to 2.18.4.
2 changes: 1 addition & 1 deletion news/setuptools.vendor
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Upgraded pkg_resources (via setuptools) to 36.2.6.
Upgraded pkg_resources (via setuptools) to 36.4.0.
1 change: 1 addition & 0 deletions news/urllib3.vendor
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Vendored urllib3 at 1.22.
10 changes: 3 additions & 7 deletions src/pip/_internal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# to add socks as yet another dependency for pip, nor do I want to allow-stder
# in the DEP-8 tests, so just suppress the warning. pdb tells me this has to
# be done before the import of pip.vcs.
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
from pip._vendor.urllib3.exceptions import DependencyWarning
warnings.filterwarnings("ignore", category=DependencyWarning) # noqa

# We want to inject the use of SecureTransport as early as possible so that any
Expand All @@ -32,9 +32,7 @@
if (sys.platform == "darwin" and
ssl.OPENSSL_VERSION_NUMBER < 0x1000100f): # OpenSSL 1.0.1
try:
from pip._vendor.requests.packages.urllib3.contrib import (
securetransport,
)
from pip._vendor.urllib3.contrib import securetransport
except (ImportError, OSError):
pass
else:
Expand All @@ -51,9 +49,7 @@
)
from pip._internal.commands import get_summaries, get_similar_commands
from pip._internal.commands import commands_dict
from pip._vendor.requests.packages.urllib3.exceptions import (
InsecureRequestWarning,
)
from pip._vendor.urllib3.exceptions import InsecureRequestWarning

logger = logging.getLogger(__name__)

Expand Down
3 changes: 1 addition & 2 deletions src/pip/_internal/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@
import shutil
import sys

from pip._vendor import requests, six
from pip._vendor import requests, six, urllib3
from pip._vendor.cachecontrol import CacheControlAdapter
from pip._vendor.cachecontrol.caches import FileCache
from pip._vendor.lockfile import LockError
from pip._vendor.requests.adapters import BaseAdapter, HTTPAdapter
from pip._vendor.requests.auth import AuthBase, HTTPBasicAuth
from pip._vendor.requests.models import CONTENT_CHUNK_SIZE, Response
from pip._vendor.requests.packages import urllib3
from pip._vendor.requests.structures import CaseInsensitiveDict
from pip._vendor.requests.utils import get_netrc_auth
# NOTE: XMLRPC Client is not annotated in typeshed as on 2017-07-17, which is
Expand Down
2 changes: 1 addition & 1 deletion src/pip/_vendor/cachecontrol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
__author__ = 'Eric Larson'
__email__ = 'eric@ionrock.org'
__version__ = '0.12.2'
__version__ = '0.12.3'

from .wrapper import CacheControl
from .adapter import CacheControlAdapter
Expand Down
2 changes: 1 addition & 1 deletion src/pip/_vendor/cachecontrol/caches/file_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
FileNotFoundError
except NameError:
# py2.X
FileNotFoundError = IOError
FileNotFoundError = OSError


def _secure_open_write(filename, fmode):
Expand Down
13 changes: 11 additions & 2 deletions src/pip/_vendor/cachecontrol/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,17 @@
import pickle


from pip._vendor.requests.packages.urllib3.response import HTTPResponse
from pip._vendor.requests.packages.urllib3.util import is_fp_closed
# Handle the case where the requests module has been patched to not have
# urllib3 bundled as part of its source.
try:
from pip._vendor.requests.packages.urllib3.response import HTTPResponse
except ImportError:
from pip._vendor.urllib3.response import HTTPResponse

try:
from pip._vendor.requests.packages.urllib3.util import is_fp_closed
except ImportError:
from pip._vendor.urllib3.util import is_fp_closed

# Replicate some six behaviour
try:
Expand Down
1 change: 1 addition & 0 deletions src/pip/_vendor/certifi.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from certifi import *
3 changes: 3 additions & 0 deletions src/pip/_vendor/certifi/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .core import where, old_where

__version__ = "2017.07.27.1"
2 changes: 2 additions & 0 deletions src/pip/_vendor/certifi/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from certifi import where
print(where())

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions src/pip/_vendor/certifi/core.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
certifi.py
~~~~~~~~~~
This module returns the installation location of cacert.pem.
"""
import os
import warnings


class DeprecatedBundleWarning(DeprecationWarning):
"""
The weak security bundle is being deprecated. Please bother your service
provider to get them to stop using cross-signed roots.
"""


def where():
f = os.path.dirname(__file__)

return os.path.join(f, 'cacert.pem')


def old_where():
warnings.warn(
"The weak security bundle is being deprecated.",
DeprecatedBundleWarning
)
f = os.path.dirname(__file__)
return os.path.join(f, 'weak.pem')

if __name__ == '__main__':
print(where())

0 comments on commit 6e2391a

Please sign in to comment.