Skip to content

Commit bd02564

Browse files
authored
Vendoring Updates for Jan 2020 (#7618)
2 parents 0e1e0ef + 7b2f0aa commit bd02564

Some content is hidden

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

48 files changed

+456
-167
lines changed

news/CacheControl.vendor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade CacheControl to 0.12.5

news/certifi.vendor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade certifi to 2019.9.11

news/colorama.vendor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade colorama to 0.4.1

news/distlib.vendor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade distlib to 0.2.9.post0

news/ipaddress.vendor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade ipaddress to 1.0.22

news/pkg_resources.vendor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade pkg_resources (via setuptools) to 44.0.0

news/pyparsing.vendor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade pyparsing to 2.4.2

news/six.vendor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade six to 1.12.0

news/urllib3.vendor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade urllib3 to 1.25.6

src/pip/_vendor/cachecontrol/__init__.py

Lines changed: 1 addition & 1 deletion
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.5"
7+
__version__ = "0.12.6"
88

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

src/pip/_vendor/cachecontrol/adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def __init__(
2424
**kw
2525
):
2626
super(CacheControlAdapter, self).__init__(*args, **kw)
27-
self.cache = cache or DictCache()
27+
self.cache = DictCache() if cache is None else cache
2828
self.heuristic = heuristic
2929
self.cacheable_methods = cacheable_methods or ("GET",)
3030

src/pip/_vendor/cachecontrol/controller.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class CacheController(object):
3434
def __init__(
3535
self, cache=None, cache_etags=True, serializer=None, status_codes=None
3636
):
37-
self.cache = cache or DictCache()
37+
self.cache = DictCache() if cache is None else cache
3838
self.cache_etags = cache_etags
3939
self.serializer = serializer or Serializer()
4040
self.cacheable_status_codes = status_codes or (200, 203, 300, 301)
@@ -293,6 +293,15 @@ def cache_response(self, request, response, body=None, status_codes=None):
293293
if no_store:
294294
return
295295

296+
# https://tools.ietf.org/html/rfc7234#section-4.1:
297+
# A Vary header field-value of "*" always fails to match.
298+
# Storing such a response leads to a deserialization warning
299+
# during cache lookup and is not allowed to ever be served,
300+
# so storing it can be avoided.
301+
if "*" in response_headers.get("vary", ""):
302+
logger.debug('Response header has "Vary: *"')
303+
return
304+
296305
# If we've been given an etag, then keep the response
297306
if self.cache_etags and "etag" in response_headers:
298307
logger.debug("Caching due to etag")

src/pip/_vendor/cachecontrol/serialize.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ def prepare_response(self, request, cached):
107107
"""
108108
# Special case the '*' Vary value as it means we cannot actually
109109
# determine if the cached response is suitable for this request.
110+
# This case is also handled in the controller code when creating
111+
# a cache entry, but is left here for backwards compatibility.
110112
if "*" in cached.get("vary", {}):
111113
return
112114

@@ -179,7 +181,7 @@ def _loads_v3(self, request, data):
179181

180182
def _loads_v4(self, request, data):
181183
try:
182-
cached = msgpack.loads(data, encoding="utf-8")
184+
cached = msgpack.loads(data, raw=False)
183185
except ValueError:
184186
return
185187

src/pip/_vendor/cachecontrol/wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def CacheControl(
1313
cacheable_methods=None,
1414
):
1515

16-
cache = cache or DictCache()
16+
cache = DictCache() if cache is None else cache
1717
adapter_class = adapter_class or CacheControlAdapter
1818
adapter = adapter_class(
1919
cache,

src/pip/_vendor/certifi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from .core import where
22

3-
__version__ = "2019.09.11"
3+
__version__ = "2019.11.28"

src/pip/_vendor/certifi/cacert.pem

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4556,3 +4556,47 @@ L5/ndtFhKvshuzHQqp9HpLIiyhY6UFfEW0NnxWViA0kB60PZ2Pierc+xYw5F9KBa
45564556
LJstxabArahH9CdMOA0uG0k7UvToiIMrVCjU8jVStDKDYmlkDJGcn5fqdBb9HxEG
45574557
mpv0
45584558
-----END CERTIFICATE-----
4559+
4560+
# Issuer: CN=Entrust Root Certification Authority - G4 O=Entrust, Inc. OU=See www.entrust.net/legal-terms/(c) 2015 Entrust, Inc. - for authorized use only
4561+
# Subject: CN=Entrust Root Certification Authority - G4 O=Entrust, Inc. OU=See www.entrust.net/legal-terms/(c) 2015 Entrust, Inc. - for authorized use only
4562+
# Label: "Entrust Root Certification Authority - G4"
4563+
# Serial: 289383649854506086828220374796556676440
4564+
# MD5 Fingerprint: 89:53:f1:83:23:b7:7c:8e:05:f1:8c:71:38:4e:1f:88
4565+
# SHA1 Fingerprint: 14:88:4e:86:26:37:b0:26:af:59:62:5c:40:77:ec:35:29:ba:96:01
4566+
# SHA256 Fingerprint: db:35:17:d1:f6:73:2a:2d:5a:b9:7c:53:3e:c7:07:79:ee:32:70:a6:2f:b4:ac:42:38:37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CfDrGA4tGeEWSpiBE6doLlYsKA2KSD7ZPvfC+QsDJMlhVoSFLUmQjAJOgc47Ol
4599+
IQ6SwJAfzyBfyjs4x7dtOvPmRLgOMWuIjnDrnBdSqEGULoe256YSxXXfW8AKbnuk
4600+
5F6G+TaU33fD6Q3AOfF5u0aOq0NZJ7cguyPpVkAh7DE9ZapD8j3fcEThuk0mEDuY
4601+
n/PIjhs4ViFqUZPTkcpG2om3PVODLAgfi49T3f+sHw==
4602+
-----END CERTIFICATE-----

src/pip/_vendor/colorama/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
from .ansi import Fore, Back, Style, Cursor
44
from .ansitowin32 import AnsiToWin32
55

6-
__version__ = '0.4.1'
6+
__version__ = '0.4.3'

src/pip/_vendor/distlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
import logging
88

9-
__version__ = '0.2.9.post0'
9+
__version__ = '0.3.0'
1010

1111
class DistlibException(Exception):
1212
pass

src/pip/_vendor/distlib/_backport/sysconfig.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,9 @@ def _replacer(matchobj):
119119

120120
#_expand_globals(_SCHEMES)
121121

122-
# FIXME don't rely on sys.version here, its format is an implementation detail
123-
# of CPython, use sys.version_info or sys.hexversion
124-
_PY_VERSION = sys.version.split()[0]
125-
_PY_VERSION_SHORT = sys.version[:3]
126-
_PY_VERSION_SHORT_NO_DOT = _PY_VERSION[0] + _PY_VERSION[2]
122+
_PY_VERSION = '%s.%s.%s' % sys.version_info[:3]
123+
_PY_VERSION_SHORT = '%s.%s' % sys.version_info[:2]
124+
_PY_VERSION_SHORT_NO_DOT = '%s%s' % sys.version_info[:2]
127125
_PREFIX = os.path.normpath(sys.prefix)
128126
_EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
129127
_CONFIG_VARS = None

src/pip/_vendor/distlib/database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ def __init__(self, path, metadata=None, env=None):
567567
p = os.path.join(path, 'top_level.txt')
568568
if os.path.exists(p):
569569
with open(p, 'rb') as f:
570-
data = f.read()
570+
data = f.read().decode('utf-8')
571571
self.modules = data.splitlines()
572572

573573
def __repr__(self):

src/pip/_vendor/distlib/locators.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -304,18 +304,25 @@ def same_project(name1, name2):
304304

305305
def _get_digest(self, info):
306306
"""
307-
Get a digest from a dictionary by looking at keys of the form
308-
'algo_digest'.
307+
Get a digest from a dictionary by looking at a "digests" dictionary
308+
or keys of the form 'algo_digest'.
309309
310310
Returns a 2-tuple (algo, digest) if found, else None. Currently
311311
looks only for SHA256, then MD5.
312312
"""
313313
result = None
314-
for algo in ('sha256', 'md5'):
315-
key = '%s_digest' % algo
316-
if key in info:
317-
result = (algo, info[key])
318-
break
314+
if 'digests' in info:
315+
digests = info['digests']
316+
for algo in ('sha256', 'md5'):
317+
if algo in digests:
318+
result = (algo, digests[algo])
319+
break
320+
if not result:
321+
for algo in ('sha256', 'md5'):
322+
key = '%s_digest' % algo
323+
if key in info:
324+
result = (algo, info[key])
325+
break
319326
return result
320327

321328
def _update_version_data(self, result, info):

src/pip/_vendor/distlib/scripts.py

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,16 @@ def _get_shebang(self, encoding, post_interp=b'', options=None):
172172

173173
if sys.platform.startswith('java'): # pragma: no cover
174174
executable = self._fix_jython_executable(executable)
175-
# Normalise case for Windows
176-
executable = os.path.normcase(executable)
175+
176+
# Normalise case for Windows - COMMENTED OUT
177+
# executable = os.path.normcase(executable)
178+
# N.B. The normalising operation above has been commented out: See
179+
# issue #124. Although paths in Windows are generally case-insensitive,
180+
# they aren't always. For example, a path containing a ẞ (which is a
181+
# LATIN CAPITAL LETTER SHARP S - U+1E9E) is normcased to ß (which is a
182+
# LATIN SMALL LETTER SHARP S' - U+00DF). The two are not considered by
183+
# Windows as equivalent in path names.
184+
177185
# If the user didn't specify an executable, it may be necessary to
178186
# cater for executable paths with spaces (not uncommon on Windows)
179187
if enquote:
@@ -285,9 +293,10 @@ def _make_script(self, entry, filenames, options=None):
285293
if '' in self.variants:
286294
scriptnames.add(name)
287295
if 'X' in self.variants:
288-
scriptnames.add('%s%s' % (name, sys.version[0]))
296+
scriptnames.add('%s%s' % (name, sys.version_info[0]))
289297
if 'X.Y' in self.variants:
290-
scriptnames.add('%s-%s' % (name, sys.version[:3]))
298+
scriptnames.add('%s-%s.%s' % (name, sys.version_info[0],
299+
sys.version_info[1]))
291300
if options and options.get('gui', False):
292301
ext = 'pyw'
293302
else:
@@ -367,8 +376,12 @@ def _get_launcher(self, kind):
367376
# Issue 31: don't hardcode an absolute package name, but
368377
# determine it relative to the current package
369378
distlib_package = __name__.rsplit('.', 1)[0]
370-
result = finder(distlib_package).find(name).bytes
371-
return result
379+
resource = finder(distlib_package).find(name)
380+
if not resource:
381+
msg = ('Unable to find resource %s in package %s' % (name,
382+
distlib_package))
383+
raise ValueError(msg)
384+
return resource.bytes
372385

373386
# Public API follows
374387

src/pip/_vendor/distlib/t32.exe

4 KB
Binary file not shown.

src/pip/_vendor/distlib/t64.exe

3 KB
Binary file not shown.

src/pip/_vendor/distlib/util.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ def __eq__(self, other):
703703

704704
ENTRY_RE = re.compile(r'''(?P<name>(\w|[-.+])+)
705705
\s*=\s*(?P<callable>(\w+)([:\.]\w+)*)
706-
\s*(\[\s*(?P<flags>\w+(=\w+)?(,\s*\w+(=\w+)?)*)\s*\])?
706+
\s*(\[\s*(?P<flags>[\w-]+(=\w+)?(,\s*\w+(=\w+)?)*)\s*\])?
707707
''', re.VERBOSE)
708708

709709
def get_export_entry(specification):
@@ -1438,7 +1438,8 @@ def connect(self):
14381438
ca_certs=self.ca_certs)
14391439
else: # pragma: no cover
14401440
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
1441-
context.options |= ssl.OP_NO_SSLv2
1441+
if hasattr(ssl, 'OP_NO_SSLv2'):
1442+
context.options |= ssl.OP_NO_SSLv2
14421443
if self.cert_file:
14431444
context.load_cert_chain(self.cert_file, self.key_file)
14441445
kwargs = {}

src/pip/_vendor/distlib/w32.exe

1 KB
Binary file not shown.

src/pip/_vendor/distlib/w64.exe

0 Bytes
Binary file not shown.

src/pip/_vendor/distlib/wheel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ def _get_dylib_cache(self):
684684
if cache is None:
685685
# Use native string to avoid issues on 2.x: see Python #20140.
686686
base = os.path.join(get_cache_base(), str('dylib-cache'),
687-
sys.version[:3])
687+
'%s.%s' % sys.version_info[:2])
688688
cache = Cache(base)
689689
return cache
690690

src/pip/_vendor/ipaddress.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import itertools
1515
import struct
1616

17-
__version__ = '1.0.22'
17+
__version__ = '1.0.23'
1818

1919
# Compatibility functions
2020
_compat_int_types = (int,)
@@ -1103,7 +1103,8 @@ def _is_subnet_of(a, b):
11031103
try:
11041104
# Always false if one is v4 and the other is v6.
11051105
if a._version != b._version:
1106-
raise TypeError("%s and %s are not of the same version" (a, b))
1106+
raise TypeError(
1107+
"%s and %s are not of the same version" % (a, b))
11071108
return (b.network_address <= a.network_address and
11081109
b.broadcast_address >= a.broadcast_address)
11091110
except AttributeError:

src/pip/_vendor/pkg_resources/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@
8888
__metaclass__ = type
8989

9090

91-
if (3, 0) < sys.version_info < (3, 4):
92-
raise RuntimeError("Python 3.4 or later is required")
91+
if (3, 0) < sys.version_info < (3, 5):
92+
raise RuntimeError("Python 3.5 or later is required")
9393

9494
if six.PY2:
9595
# Those builtin exceptions are only defined in Python 3
@@ -333,7 +333,7 @@ class UnknownExtra(ResolutionError):
333333

334334
_provider_factories = {}
335335

336-
PY_MAJOR = sys.version[:3]
336+
PY_MAJOR = '{}.{}'.format(*sys.version_info)
337337
EGG_DIST = 3
338338
BINARY_DIST = 2
339339
SOURCE_DIST = 1
@@ -3109,6 +3109,7 @@ def __init__(self, requirement_string):
31093109
self.extras = tuple(map(safe_extra, self.extras))
31103110
self.hashCmp = (
31113111
self.key,
3112+
self.url,
31123113
self.specifier,
31133114
frozenset(self.extras),
31143115
str(self.marker) if self.marker else None,

0 commit comments

Comments
 (0)