Upgrade vendored dependencies

This commit is contained in:
Donald Stufft 2019-04-23 16:53:23 -04:00
parent 627eeecd15
commit 5db1344c23
56 changed files with 418 additions and 98 deletions

1
news/certifi.vendor Normal file
View File

@ -0,0 +1 @@
Updated certifi to 2019.3.9

1
news/distro.vendor Normal file
View File

@ -0,0 +1 @@
Updated distro to 1.4.0

1
news/pyparsing.vendor Normal file
View File

@ -0,0 +1 @@
Updated pyparsing to 2.4.0

1
news/setuptools.vendor Normal file
View File

@ -0,0 +1 @@
Updated pkg_resources to 41.0.1 (via setuptools)

View File

@ -1,3 +1,3 @@
from .core import where from .core import where
__version__ = "2018.11.29" __version__ = "2019.03.09"

View File

@ -4510,3 +4510,149 @@ Nwf9JtmYhST/WSMDmu2dnajkXjjO11INb9I/bbEFa0nOipFGc/T2L/Coc3cOZayh
jWZSaX5LaAzHHjcng6WMxwLkFM1JAbBzs/3GkDpv0mztO+7skb6iQ12LAEpmJURw jWZSaX5LaAzHHjcng6WMxwLkFM1JAbBzs/3GkDpv0mztO+7skb6iQ12LAEpmJURw
3kAP+HwV96LOPNdeE4yBFxgX0b3xdxA61GU5wSesVywlVP+i2k+KYTlerj1KjL0= 3kAP+HwV96LOPNdeE4yBFxgX0b3xdxA61GU5wSesVywlVP+i2k+KYTlerj1KjL0=
-----END CERTIFICATE----- -----END CERTIFICATE-----
# Issuer: CN=emSign Root CA - G1 O=eMudhra Technologies Limited OU=emSign PKI
# Subject: CN=emSign Root CA - G1 O=eMudhra Technologies Limited OU=emSign PKI
# Label: "emSign Root CA - G1"
# Serial: 235931866688319308814040
# MD5 Fingerprint: 9c:42:84:57:dd:cb:0b:a7:2e:95:ad:b6:f3:da:bc:ac
# SHA1 Fingerprint: 8a:c7:ad:8f:73:ac:4e:c1:b5:75:4d:a5:40:f4:fc:cf:7c:b5:8e:8c
# SHA256 Fingerprint: 40:f6:af:03:46:a9:9a:a1:cd:1d:55:5a:4e:9c:ce:62:c7:f9:63:46:03:ee:40:66:15:83:3d:c8:c8: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YIAwlG7mDgfrbESQRRfXBgvKqy/3lyeqYdPV8q+Mri/Tm3R7nrft8EI6/6nAYH
6ftjk4BAtcZsCjEozgyfz7MjNYBBjWzEN3uBL4ChQEKF6dk4jeihU80Bv2noWgby
RQuQ+q7hv53yrlc8pa6yVvSLZUDp/TGBLPQ5Cdjua6e0ph0VpZj3AYHYhX3zUVxx
iN66zB+Afko=
-----END CERTIFICATE-----
# Issuer: CN=emSign ECC Root CA - G3 O=eMudhra Technologies Limited OU=emSign PKI
# Subject: CN=emSign ECC Root CA - G3 O=eMudhra Technologies Limited OU=emSign PKI
# Label: "emSign ECC Root CA - G3"
# Serial: 287880440101571086945156
# MD5 Fingerprint: ce:0b:72:d1:9f:88:8e:d0:50:03:e8:e3:b8:8b:67:40
# SHA1 Fingerprint: 30:43:fa:4f:f2:57:dc:a0:c3:80:ee:2e:58:ea:78:b2:3f:e6:bb:c1
# SHA256 Fingerprint: 86:a1:ec:ba:08:9c:4a:8d:3b:be:27:34:c6:12:ba:34:1d:81:3e:04:3c:f9:e8:a8:62:cd:5c:57:a3:6b:be:6b
-----BEGIN CERTIFICATE-----
MIICTjCCAdOgAwIBAgIKPPYHqWhwDtqLhDAKBggqhkjOPQQDAzBrMQswCQYDVQQG
EwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNo
bm9sb2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0g
RzMwHhcNMTgwMjE4MTgzMDAwWhcNNDMwMjE4MTgzMDAwWjBrMQswCQYDVQQGEwJJ
TjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9s
b2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0gRzMw
djAQBgcqhkjOPQIBBgUrgQQAIgNiAAQjpQy4LRL1KPOxst3iAhKAnjlfSU2fySU0
WXTsuwYc58Byr+iuL+FBVIcUqEqy6HyC5ltqtdyzdc6LBtCGI79G1Y4PPwT01xyS
fvalY8L1X44uT6EYGQIrMgqCZH0Wk9GjQjBAMB0GA1UdDgQWBBR8XQKEE9TMipuB
zhccLikenEhjQjAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggq
hkjOPQQDAwNpADBmAjEAvvNhzwIQHWSVB7gYboiFBS+DCBeQyh+KTOgNG3qxrdWB
CUfvO6wIBHxcmbHtRwfSAjEAnbpV/KlK6O3t5nYBQnvI+GDZjVGLVTv7jHvrZQnD
+JbNR6iC8hZVdyR+EhCVBCyj
-----END CERTIFICATE-----
# Issuer: CN=emSign Root CA - C1 O=eMudhra Inc OU=emSign PKI
# Subject: CN=emSign Root CA - C1 O=eMudhra Inc OU=emSign PKI
# Label: "emSign Root CA - C1"
# Serial: 825510296613316004955058
# MD5 Fingerprint: d8:e3:5d:01:21:fa:78:5a:b0:df:ba:d2:ee:2a:5f:68
# SHA1 Fingerprint: e7:2e:f1:df:fc:b2:09:28:cf:5d:d4:d5:67:37:b1:51:cb:86:4f:01
# SHA256 Fingerprint: 12:56:09:aa:30:1d:a0:a2:49:b9:7a:82:39:cb:6a:34:21:6f:44:dc:ac:9f:39:54:b1:42:92:f2:e8:c8:60:8f
-----BEGIN CERTIFICATE-----
MIIDczCCAlugAwIBAgILAK7PALrEzzL4Q7IwDQYJKoZIhvcNAQELBQAwVjELMAkG
A1UEBhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEg
SW5jMRwwGgYDVQQDExNlbVNpZ24gUm9vdCBDQSAtIEMxMB4XDTE4MDIxODE4MzAw
MFoXDTQzMDIxODE4MzAwMFowVjELMAkGA1UEBhMCVVMxEzARBgNVBAsTCmVtU2ln
biBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQDExNlbVNpZ24gUm9v
dCBDQSAtIEMxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz+upufGZ
BczYKCFK83M0UYRWEPWgTywS4/oTmifQz/l5GnRfHXk5/Fv4cI7gklL35CX5VIPZ
HdPIWoU/Xse2B+4+wM6ar6xWQio5JXDWv7V7Nq2s9nPczdcdioOl+yuQFTdrHCZH
3DspVpNqs8FqOp099cGXOFgFixwR4+S0uF2FHYP+eF8LRWgYSKVGczQ7/g/IdrvH
GPMF0Ybzhe3nudkyrVWIzqa2kbBPrH4VI5b2P/AgNBbeCsbEBEV5f6f9vtKppa+c
xSMq9zwhbL2vj07FOrLzNBL834AaSaTUqZX3noleoomslMuoaJuvimUnzYnu3Yy1
aylwQ6BpC+S5DwIDAQABo0IwQDAdBgNVHQ4EFgQU/qHgcB4qAzlSWkK+XJGFehiq
TbUwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEL
BQADggEBAMJKVvoVIXsoounlHfv4LcQ5lkFMOycsxGwYFYDGrK9HWS8mC+M2sO87
/kOXSTKZEhVb3xEp/6tT+LvBeA+snFOvV71ojD1pM/CjoCNjO2RnIkSt1XHLVip4
kqNPEjE2NuLe/gDEo2APJ62gsIq1NnpSob0n9CAnYuhNlCQT5AoE6TyrLshDCUrG
YQTlSTR+08TI9Q/Aqum6VF7zYytPT1DU/rl7mYw9wC68AivTxEDkigcxHpvOJpkT
+xHqmiIMERnHXhuBUDDIlhJu58tBf5E7oke3VIAb3ADMmpDqw8NQBmIMMMAVSKeo
WXzhriKi4gp6D/piq1JM4fHfyr6DDUI=
-----END CERTIFICATE-----
# Issuer: CN=emSign ECC Root CA - C3 O=eMudhra Inc OU=emSign PKI
# Subject: CN=emSign ECC Root CA - C3 O=eMudhra Inc OU=emSign PKI
# Label: "emSign ECC Root CA - C3"
# Serial: 582948710642506000014504
# MD5 Fingerprint: 3e:53:b3:a3:81:ee:d7:10:f8:d3:b0:1d:17:92:f5:d5
# SHA1 Fingerprint: b6:af:43:c2:9b:81:53:7d:f6:ef:6b:c3:1f:1f:60:15:0c:ee:48:66
# SHA256 Fingerprint: bc:4d:80:9b:15:18:9d:78:db:3e:1d:8c:f4:f9:72:6a:79:5d:a1:64:3c:a5:f1:35:8e:1d:db:0e:dc:0d:7e:b3
-----BEGIN CERTIFICATE-----
MIICKzCCAbGgAwIBAgIKe3G2gla4EnycqDAKBggqhkjOPQQDAzBaMQswCQYDVQQG
EwJVUzETMBEGA1UECxMKZW1TaWduIFBLSTEUMBIGA1UEChMLZU11ZGhyYSBJbmMx
IDAeBgNVBAMTF2VtU2lnbiBFQ0MgUm9vdCBDQSAtIEMzMB4XDTE4MDIxODE4MzAw
MFoXDTQzMDIxODE4MzAwMFowWjELMAkGA1UEBhMCVVMxEzARBgNVBAsTCmVtU2ln
biBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMSAwHgYDVQQDExdlbVNpZ24gRUND
IFJvb3QgQ0EgLSBDMzB2MBAGByqGSM49AgEGBSuBBAAiA2IABP2lYa57JhAd6bci
MK4G9IGzsUJxlTm801Ljr6/58pc1kjZGDoeVjbk5Wum739D+yAdBPLtVb4Ojavti
sIGJAnB9SMVK4+kiVCJNk7tCDK93nCOmfddhEc5lx/h//vXyqaNCMEAwHQYDVR0O
BBYEFPtaSNCAIEDyqOkAB2kZd6fmw/TPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB
Af8EBTADAQH/MAoGCCqGSM49BAMDA2gAMGUCMQC02C8Cif22TGK6Q04ThHK1rt0c
3ta13FaPWEBaLd4gTCKDypOofu4SQMfWh0/434UCMBwUZOR8loMRnLDRWmFLpg9J
0wD8ofzkpf9/rdcw0Md3f76BB1UwUCAU9Vc4CqgxUQ==
-----END CERTIFICATE-----
# Issuer: CN=Hongkong Post Root CA 3 O=Hongkong Post
# Subject: CN=Hongkong Post Root CA 3 O=Hongkong Post
# Label: "Hongkong Post Root CA 3"
# Serial: 46170865288971385588281144162979347873371282084
# MD5 Fingerprint: 11:fc:9f:bd:73:30:02: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5F9KBa
LJstxabArahH9CdMOA0uG0k7UvToiIMrVCjU8jVStDKDYmlkDJGcn5fqdBb9HxEG
mpv0
-----END CERTIFICATE-----

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
@ -14,7 +13,3 @@ def where():
f = os.path.dirname(__file__) f = os.path.dirname(__file__)
return os.path.join(f, 'cacert.pem') return os.path.join(f, 'cacert.pem')
if __name__ == '__main__':
print(where())

View File

@ -17,12 +17,12 @@ The ``distro`` package (``distro`` stands for Linux Distribution) provides
information about the Linux distribution it runs on, such as a reliable information about the Linux distribution it runs on, such as a reliable
machine-readable distro ID, or version information. machine-readable distro ID, or version information.
It is a renewed alternative implementation for Python's original It is the recommended replacement for Python's original
:py:func:`platform.linux_distribution` function, but it provides much more :py:func:`platform.linux_distribution` function, but it provides much more
functionality. An alternative implementation became necessary because Python functionality. An alternative implementation became necessary because Python
3.5 deprecated this function, and Python 3.7 is expected to remove it 3.5 deprecated this function, and Python 3.8 will remove it altogether.
altogether. Its predecessor function :py:func:`platform.dist` was already Its predecessor function :py:func:`platform.dist` was already
deprecated since Python 2.6 and is also expected to be removed in Python 3.7. deprecated since Python 2.6 and will also be removed in Python 3.8.
Still, there are many cases in which access to OS distribution information Still, there are many cases in which access to OS distribution information
is needed. See `Python issue 1322 <https://bugs.python.org/issue1322>`_ for is needed. See `Python issue 1322 <https://bugs.python.org/issue1322>`_ for
more information. more information.
@ -48,7 +48,9 @@ _OS_RELEASE_BASENAME = 'os-release'
#: with blanks translated to underscores. #: with blanks translated to underscores.
#: #:
#: * Value: Normalized value. #: * Value: Normalized value.
NORMALIZED_OS_ID = {} NORMALIZED_OS_ID = {
'ol': 'oracle', # Oracle Enterprise Linux
}
#: Translation table for normalizing the "Distributor ID" attribute returned by #: Translation table for normalizing the "Distributor ID" attribute returned by
#: the lsb_release command, for use by the :func:`distro.id` method. #: the lsb_release command, for use by the :func:`distro.id` method.
@ -812,10 +814,14 @@ class LinuxDistribution(object):
For details, see :func:`distro.codename`. For details, see :func:`distro.codename`.
""" """
return self.os_release_attr('codename') \ try:
or self.lsb_release_attr('codename') \ # Handle os_release specially since distros might purposefully set
or self.distro_release_attr('codename') \ # this to empty string to have no codename
or '' return self._os_release_info['codename']
except KeyError:
return self.lsb_release_attr('codename') \
or self.distro_release_attr('codename') \
or ''
def info(self, pretty=False, best=False): def info(self, pretty=False, best=False):
""" """
@ -872,6 +878,7 @@ class LinuxDistribution(object):
For details, see :func:`distro.uname_info`. For details, see :func:`distro.uname_info`.
""" """
return self._uname_info
def os_release_attr(self, attribute): def os_release_attr(self, attribute):
""" """
@ -963,23 +970,30 @@ class LinuxDistribution(object):
if isinstance(v, bytes): if isinstance(v, bytes):
v = v.decode('utf-8') v = v.decode('utf-8')
props[k.lower()] = v props[k.lower()] = v
if k == 'VERSION':
# this handles cases in which the codename is in
# the `(CODENAME)` (rhel, centos, fedora) format
# or in the `, CODENAME` format (Ubuntu).
codename = re.search(r'(\(\D+\))|,(\s+)?\D+', v)
if codename:
codename = codename.group()
codename = codename.strip('()')
codename = codename.strip(',')
codename = codename.strip()
# codename appears within paranthese.
props['codename'] = codename
else:
props['codename'] = ''
else: else:
# Ignore any tokens that are not variable assignments # Ignore any tokens that are not variable assignments
pass pass
if 'version_codename' in props:
# os-release added a version_codename field. Use that in
# preference to anything else Note that some distros purposefully
# do not have code names. They should be setting
# version_codename=""
props['codename'] = props['version_codename']
elif 'ubuntu_codename' in props:
# Same as above but a non-standard field name used on older Ubuntus
props['codename'] = props['ubuntu_codename']
elif 'version' in props:
# If there is no version_codename, parse it from the version
codename = re.search(r'(\(\D+\))|,(\s+)?\D+', props['version'])
if codename:
codename = codename.group()
codename = codename.strip('()')
codename = codename.strip(',')
codename = codename.strip()
# codename appears within paranthese.
props['codename'] = codename
return props return props
@cached_property @cached_property
@ -1072,7 +1086,10 @@ class LinuxDistribution(object):
# file), because we want to use what was specified as best as # file), because we want to use what was specified as best as
# possible. # possible.
match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename) match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
if match: if 'name' in distro_info \
and 'cloudlinux' in distro_info['name'].lower():
distro_info['id'] = 'cloudlinux'
elif match:
distro_info['id'] = match.group(1) distro_info['id'] = match.group(1)
return distro_info return distro_info
else: else:
@ -1113,6 +1130,8 @@ class LinuxDistribution(object):
# The name is always present if the pattern matches # The name is always present if the pattern matches
self.distro_release_file = filepath self.distro_release_file = filepath
distro_info['id'] = match.group(1) distro_info['id'] = match.group(1)
if 'cloudlinux' in distro_info['name'].lower():
distro_info['id'] = 'cloudlinux'
return distro_info return distro_info
return {} return {}

0
src/pip/_vendor/idna/LICENSE.rst Executable file → Normal file
View File

0
src/pip/_vendor/idna/__init__.py Executable file → Normal file
View File

0
src/pip/_vendor/idna/codec.py Executable file → Normal file
View File

0
src/pip/_vendor/idna/compat.py Executable file → Normal file
View File

0
src/pip/_vendor/idna/core.py Executable file → Normal file
View File

0
src/pip/_vendor/idna/idnadata.py Executable file → Normal file
View File

0
src/pip/_vendor/idna/intranges.py Executable file → Normal file
View File

0
src/pip/_vendor/idna/package_data.py Executable file → Normal file
View File

0
src/pip/_vendor/idna/uts46data.py Executable file → Normal file
View File

View File

@ -39,6 +39,8 @@ import tempfile
import textwrap import textwrap
import itertools import itertools
import inspect import inspect
import ntpath
import posixpath
from pkgutil import get_importer from pkgutil import get_importer
try: try:
@ -1401,8 +1403,15 @@ class NullProvider:
def has_resource(self, resource_name): def has_resource(self, resource_name):
return self._has(self._fn(self.module_path, resource_name)) return self._has(self._fn(self.module_path, resource_name))
def _get_metadata_path(self, name):
return self._fn(self.egg_info, name)
def has_metadata(self, name): def has_metadata(self, name):
return self.egg_info and self._has(self._fn(self.egg_info, name)) if not self.egg_info:
return self.egg_info
path = self._get_metadata_path(name)
return self._has(path)
def get_metadata(self, name): def get_metadata(self, name):
if not self.egg_info: if not self.egg_info:
@ -1466,10 +1475,86 @@ class NullProvider:
) )
def _fn(self, base, resource_name): def _fn(self, base, resource_name):
self._validate_resource_path(resource_name)
if resource_name: if resource_name:
return os.path.join(base, *resource_name.split('/')) return os.path.join(base, *resource_name.split('/'))
return base return base
@staticmethod
def _validate_resource_path(path):
"""
Validate the resource paths according to the docs.
https://setuptools.readthedocs.io/en/latest/pkg_resources.html#basic-resource-access
>>> warned = getfixture('recwarn')
>>> warnings.simplefilter('always')
>>> vrp = NullProvider._validate_resource_path
>>> vrp('foo/bar.txt')
>>> bool(warned)
False
>>> vrp('../foo/bar.txt')
>>> bool(warned)
True
>>> warned.clear()
>>> vrp('/foo/bar.txt')
>>> bool(warned)
True
>>> vrp('foo/../../bar.txt')
>>> bool(warned)
True
>>> warned.clear()
>>> vrp('foo/f../bar.txt')
>>> bool(warned)
False
Windows path separators are straight-up disallowed.
>>> vrp(r'\\foo/bar.txt')
Traceback (most recent call last):
...
ValueError: Use of .. or absolute path in a resource path \
is not allowed.
>>> vrp(r'C:\\foo/bar.txt')
Traceback (most recent call last):
...
ValueError: Use of .. or absolute path in a resource path \
is not allowed.
Blank values are allowed
>>> vrp('')
>>> bool(warned)
False
Non-string values are not.
>>> vrp(None)
Traceback (most recent call last):
...
AttributeError: ...
"""
invalid = (
os.path.pardir in path.split(posixpath.sep) or
posixpath.isabs(path) or
ntpath.isabs(path)
)
if not invalid:
return
msg = "Use of .. or absolute path in a resource path is not allowed."
# Aggressively disallow Windows absolute paths
if ntpath.isabs(path) and not posixpath.isabs(path):
raise ValueError(msg)
# for compatibility, warn; in future
# raise ValueError(msg)
warnings.warn(
msg[:-1] + " and will raise exceptions in a future release.",
DeprecationWarning,
stacklevel=4,
)
def _get(self, path): def _get(self, path):
if hasattr(self.loader, 'get_data'): if hasattr(self.loader, 'get_data'):
return self.loader.get_data(path) return self.loader.get_data(path)
@ -1790,6 +1875,9 @@ class FileMetadata(EmptyProvider):
def __init__(self, path): def __init__(self, path):
self.path = path self.path = path
def _get_metadata_path(self, name):
return self.path
def has_metadata(self, name): def has_metadata(self, name):
return name == 'PKG-INFO' and os.path.isfile(self.path) return name == 'PKG-INFO' and os.path.isfile(self.path)
@ -1888,7 +1976,7 @@ def find_eggs_in_zip(importer, path_item, only=False):
if only: if only:
# don't yield nested distros # don't yield nested distros
return return
for subitem in metadata.resource_listdir('/'): for subitem in metadata.resource_listdir(''):
if _is_egg_path(subitem): if _is_egg_path(subitem):
subpath = os.path.join(path_item, subitem) subpath = os.path.join(path_item, subitem)
dists = find_eggs_in_zip(zipimport.zipimporter(subpath), subpath) dists = find_eggs_in_zip(zipimport.zipimporter(subpath), subpath)
@ -2583,10 +2671,14 @@ class Distribution:
try: try:
return self._version return self._version
except AttributeError: except AttributeError:
version = _version_from_file(self._get_metadata(self.PKG_INFO)) version = self._get_version()
if version is None: if version is None:
tmpl = "Missing 'Version:' header and/or %s file" path = self._get_metadata_path_for_display(self.PKG_INFO)
raise ValueError(tmpl % self.PKG_INFO, self) msg = (
"Missing 'Version:' header and/or {} file at path: {}"
).format(self.PKG_INFO, path)
raise ValueError(msg, self)
return version return version
@property @property
@ -2644,11 +2736,34 @@ class Distribution:
) )
return deps return deps
def _get_metadata_path_for_display(self, name):
"""
Return the path to the given metadata file, if available.
"""
try:
# We need to access _get_metadata_path() on the provider object
# directly rather than through this class's __getattr__()
# since _get_metadata_path() is marked private.
path = self._provider._get_metadata_path(name)
# Handle exceptions e.g. in case the distribution's metadata
# provider doesn't support _get_metadata_path().
except Exception:
return '[could not detect]'
return path
def _get_metadata(self, name): def _get_metadata(self, name):
if self.has_metadata(name): if self.has_metadata(name):
for line in self.get_metadata_lines(name): for line in self.get_metadata_lines(name):
yield line yield line
def _get_version(self):
lines = self._get_metadata(self.PKG_INFO)
version = _version_from_file(lines)
return version
def activate(self, path=None, replace=False): def activate(self, path=None, replace=False):
"""Ensure distribution is importable on `path` (default=sys.path)""" """Ensure distribution is importable on `path` (default=sys.path)"""
if path is None: if path is None:
@ -2867,7 +2982,7 @@ class EggInfoDistribution(Distribution):
take an extra step and try to get the version number from take an extra step and try to get the version number from
the metadata file itself instead of the filename. the metadata file itself instead of the filename.
""" """
md_version = _version_from_file(self._get_metadata(self.PKG_INFO)) md_version = self._get_version()
if md_version: if md_version:
self._version = md_version self._version = md_version
return self return self

View File

@ -93,8 +93,8 @@ classes inherit from. Use the docstrings for examples of how to:
namespace class namespace class
""" """
__version__ = "2.3.1" __version__ = "2.4.0"
__versionTime__ = "09 Jan 2019 23:26 UTC" __versionTime__ = "07 Apr 2019 18:28 UTC"
__author__ = "Paul McGuire <ptmcg@users.sourceforge.net>" __author__ = "Paul McGuire <ptmcg@users.sourceforge.net>"
import string import string
@ -143,10 +143,24 @@ try:
except ImportError: except ImportError:
class SimpleNamespace: pass class SimpleNamespace: pass
# version compatibility configuration
__compat__ = SimpleNamespace()
__compat__.__doc__ = """
A cross-version compatibility configuration for pyparsing features that will be
released in a future version. By setting values in this configuration to True,
those features can be enabled in prior versions for compatibility development
and testing.
- collect_all_And_tokens - flag to enable fix for Issue #63 that fixes erroneous grouping
of results names when an And expression is nested within an Or or MatchFirst; set to
True to enable bugfix to be released in pyparsing 2.4
"""
__compat__.collect_all_And_tokens = True
#~ sys.stderr.write( "testing pyparsing module, version %s, %s\n" % (__version__,__versionTime__ ) ) #~ sys.stderr.write( "testing pyparsing module, version %s, %s\n" % (__version__,__versionTime__ ) )
__all__ = [ __all__ = [ '__version__', '__versionTime__', '__author__', '__compat__',
'And', 'CaselessKeyword', 'CaselessLiteral', 'CharsNotIn', 'Combine', 'Dict', 'Each', 'Empty', 'And', 'CaselessKeyword', 'CaselessLiteral', 'CharsNotIn', 'Combine', 'Dict', 'Each', 'Empty',
'FollowedBy', 'Forward', 'GoToColumn', 'Group', 'Keyword', 'LineEnd', 'LineStart', 'Literal', 'FollowedBy', 'Forward', 'GoToColumn', 'Group', 'Keyword', 'LineEnd', 'LineStart', 'Literal',
'PrecededBy', 'MatchFirst', 'NoMatch', 'NotAny', 'OneOrMore', 'OnlyOnce', 'Optional', 'Or', 'PrecededBy', 'MatchFirst', 'NoMatch', 'NotAny', 'OneOrMore', 'OnlyOnce', 'Optional', 'Or',
@ -350,7 +364,7 @@ class ParseException(ParseBaseException):
callers = inspect.getinnerframes(exc.__traceback__, context=depth) callers = inspect.getinnerframes(exc.__traceback__, context=depth)
seen = set() seen = set()
for i, ff in enumerate(callers[-depth:]): for i, ff in enumerate(callers[-depth:]):
frm = ff.frame frm = ff[0]
f_self = frm.f_locals.get('self', None) f_self = frm.f_locals.get('self', None)
if isinstance(f_self, ParserElement): if isinstance(f_self, ParserElement):
@ -748,7 +762,7 @@ class ParseResults(object):
print(patt.addParseAction(make_palindrome).parseString("lskdj sdlkjf lksd")) # -> 'lskdjsdlkjflksddsklfjkldsjdksl' print(patt.addParseAction(make_palindrome).parseString("lskdj sdlkjf lksd")) # -> 'lskdjsdlkjflksddsklfjkldsjdksl'
""" """
if isinstance(itemseq, ParseResults): if isinstance(itemseq, ParseResults):
self += itemseq self.__iadd__(itemseq)
else: else:
self.__toklist.extend(itemseq) self.__toklist.extend(itemseq)
@ -2517,7 +2531,9 @@ class ParserElement(object):
comments = [] comments = []
try: try:
# convert newline marks to actual newlines, and strip leading BOM if present # convert newline marks to actual newlines, and strip leading BOM if present
t = t.replace(r'\n','\n').lstrip('\ufeff') NL = Literal(r'\n').addParseAction(replaceWith('\n')).ignore(quotedString)
BOM = '\ufeff'
t = NL.transformString(t.lstrip(BOM))
result = self.parseString(t, parseAll=parseAll) result = self.parseString(t, parseAll=parseAll)
out.append(result.dump(full=fullDump)) out.append(result.dump(full=fullDump))
success = success and not failureTests success = success and not failureTests
@ -2860,6 +2876,7 @@ class Word(Token):
def __init__( self, initChars, bodyChars=None, min=1, max=0, exact=0, asKeyword=False, excludeChars=None ): def __init__( self, initChars, bodyChars=None, min=1, max=0, exact=0, asKeyword=False, excludeChars=None ):
super(Word,self).__init__() super(Word,self).__init__()
if excludeChars: if excludeChars:
excludeChars = set(excludeChars)
initChars = ''.join(c for c in initChars if c not in excludeChars) initChars = ''.join(c for c in initChars if c not in excludeChars)
if bodyChars: if bodyChars:
bodyChars = ''.join(c for c in bodyChars if c not in excludeChars) bodyChars = ''.join(c for c in bodyChars if c not in excludeChars)
@ -2920,7 +2937,7 @@ class Word(Token):
loc = result.end() loc = result.end()
return loc, result.group() return loc, result.group()
if not(instring[ loc ] in self.initChars): if instring[loc] not in self.initChars:
raise ParseException(instring, loc, self.errmsg, self) raise ParseException(instring, loc, self.errmsg, self)
start = loc start = loc
@ -2935,9 +2952,9 @@ class Word(Token):
throwException = False throwException = False
if loc - start < self.minLen: if loc - start < self.minLen:
throwException = True throwException = True
if self.maxSpecified and loc < instrlen and instring[loc] in bodychars: elif self.maxSpecified and loc < instrlen and instring[loc] in bodychars:
throwException = True throwException = True
if self.asKeyword: elif self.asKeyword:
if (start>0 and instring[start-1] in bodychars) or (loc<instrlen and instring[loc] in bodychars): if (start>0 and instring[start-1] in bodychars) or (loc<instrlen and instring[loc] in bodychars):
throwException = True throwException = True
@ -2974,8 +2991,8 @@ class Char(Word):
when defining a match of any single character in a string of when defining a match of any single character in a string of
characters. characters.
""" """
def __init__(self, charset): def __init__(self, charset, asKeyword=False, excludeChars=None):
super(Char, self).__init__(charset, exact=1) super(Char, self).__init__(charset, exact=1, asKeyword=asKeyword, excludeChars=excludeChars)
self.reString = "[%s]" % _escapeRegexRangeChars(self.initCharsOrig) self.reString = "[%s]" % _escapeRegexRangeChars(self.initCharsOrig)
self.re = re.compile( self.reString ) self.re = re.compile( self.reString )
@ -3034,24 +3051,41 @@ class Regex(Token):
self.mayReturnEmpty = True self.mayReturnEmpty = True
self.asGroupList = asGroupList self.asGroupList = asGroupList
self.asMatch = asMatch self.asMatch = asMatch
if self.asGroupList:
self.parseImpl = self.parseImplAsGroupList
if self.asMatch:
self.parseImpl = self.parseImplAsMatch
def parseImpl( self, instring, loc, doActions=True ): def parseImpl(self, instring, loc, doActions=True):
result = self.re.match(instring,loc) result = self.re.match(instring,loc)
if not result: if not result:
raise ParseException(instring, loc, self.errmsg, self) raise ParseException(instring, loc, self.errmsg, self)
loc = result.end() loc = result.end()
if self.asMatch: ret = ParseResults(result.group())
ret = result d = result.groupdict()
elif self.asGroupList: if d:
ret = result.groups() for k, v in d.items():
else: ret[k] = v
ret = ParseResults(result.group()) return loc, ret
d = result.groupdict()
if d: def parseImplAsGroupList(self, instring, loc, doActions=True):
for k, v in d.items(): result = self.re.match(instring,loc)
ret[k] = v if not result:
return loc,ret raise ParseException(instring, loc, self.errmsg, self)
loc = result.end()
ret = result.groups()
return loc, ret
def parseImplAsMatch(self, instring, loc, doActions=True):
result = self.re.match(instring,loc)
if not result:
raise ParseException(instring, loc, self.errmsg, self)
loc = result.end()
ret = result
return loc, ret
def __str__( self ): def __str__( self ):
try: try:
@ -3065,7 +3099,7 @@ class Regex(Token):
return self.strRepr return self.strRepr
def sub(self, repl): def sub(self, repl):
""" r"""
Return Regex with an attached parse action to transform the parsed Return Regex with an attached parse action to transform the parsed
result as if called using `re.sub(expr, repl, string) <https://docs.python.org/3/library/re.html#re.sub>`_. result as if called using `re.sub(expr, repl, string) <https://docs.python.org/3/library/re.html#re.sub>`_.
@ -3376,7 +3410,7 @@ class White(Token):
self.minLen = exact self.minLen = exact
def parseImpl( self, instring, loc, doActions=True ): def parseImpl( self, instring, loc, doActions=True ):
if not(instring[ loc ] in self.matchWhite): if instring[loc] not in self.matchWhite:
raise ParseException(instring, loc, self.errmsg, self) raise ParseException(instring, loc, self.errmsg, self)
start = loc start = loc
loc += 1 loc += 1
@ -3425,7 +3459,7 @@ class GoToColumn(_PositionToken):
class LineStart(_PositionToken): class LineStart(_PositionToken):
"""Matches if current position is at the beginning of a line within r"""Matches if current position is at the beginning of a line within
the parse string the parse string
Example:: Example::
@ -3648,10 +3682,6 @@ class ParseExpression(ParserElement):
return self return self
def setResultsName( self, name, listAllMatches=False ):
ret = super(ParseExpression,self).setResultsName(name,listAllMatches)
return ret
def validate( self, validateTrace=[] ): def validate( self, validateTrace=[] ):
tmp = validateTrace[:]+[self] tmp = validateTrace[:]+[self]
for e in self.exprs: for e in self.exprs:
@ -3772,7 +3802,8 @@ class Or(ParseExpression):
def streamline(self): def streamline(self):
super(Or, self).streamline() super(Or, self).streamline()
self.saveAsList = any(e.saveAsList for e in self.exprs) if __compat__.collect_all_And_tokens:
self.saveAsList = any(e.saveAsList for e in self.exprs)
return self return self
def parseImpl( self, instring, loc, doActions=True ): def parseImpl( self, instring, loc, doActions=True ):
@ -3854,13 +3885,13 @@ class MatchFirst(ParseExpression):
super(MatchFirst,self).__init__(exprs, savelist) super(MatchFirst,self).__init__(exprs, savelist)
if self.exprs: if self.exprs:
self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs) self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs)
# self.saveAsList = any(e.saveAsList for e in self.exprs)
else: else:
self.mayReturnEmpty = True self.mayReturnEmpty = True
def streamline(self): def streamline(self):
super(MatchFirst, self).streamline() super(MatchFirst, self).streamline()
self.saveAsList = any(e.saveAsList for e in self.exprs) if __compat__.collect_all_And_tokens:
self.saveAsList = any(e.saveAsList for e in self.exprs)
return self return self
def parseImpl( self, instring, loc, doActions=True ): def parseImpl( self, instring, loc, doActions=True ):
@ -4630,18 +4661,18 @@ class Forward(ParseElementEnhance):
def __str__( self ): def __str__( self ):
if hasattr(self,"name"): if hasattr(self,"name"):
return self.name return self.name
return self.__class__.__name__ + ": ..."
# stubbed out for now - creates awful memory and perf issues # Avoid infinite recursion by setting a temporary name
self._revertClass = self.__class__ self.name = self.__class__.__name__ + ": ..."
self.__class__ = _ForwardNoRecurse
# Use the string representation of main expression.
try: try:
if self.expr is not None: if self.expr is not None:
retString = _ustr(self.expr) retString = _ustr(self.expr)
else: else:
retString = "None" retString = "None"
finally: finally:
self.__class__ = self._revertClass del self.name
return self.__class__.__name__ + ": " + retString return self.__class__.__name__ + ": " + retString
def copy(self): def copy(self):
@ -4652,10 +4683,6 @@ class Forward(ParseElementEnhance):
ret <<= self ret <<= self
return ret return ret
class _ForwardNoRecurse(Forward):
def __str__( self ):
return "..."
class TokenConverter(ParseElementEnhance): class TokenConverter(ParseElementEnhance):
""" """
Abstract subclass of :class:`ParseExpression`, for converting parsed results. Abstract subclass of :class:`ParseExpression`, for converting parsed results.
@ -4726,7 +4753,7 @@ class Group(TokenConverter):
""" """
def __init__( self, expr ): def __init__( self, expr ):
super(Group,self).__init__( expr ) super(Group,self).__init__( expr )
self.saveAsList = expr.saveAsList self.saveAsList = True
def postParse( self, instring, loc, tokenlist ): def postParse( self, instring, loc, tokenlist ):
return [ tokenlist ] return [ tokenlist ]
@ -5189,7 +5216,7 @@ def ungroup(expr):
"""Helper to undo pyparsing's default grouping of And expressions, """Helper to undo pyparsing's default grouping of And expressions,
even if all but one are non-empty. even if all but one are non-empty.
""" """
return TokenConverter(expr).setParseAction(lambda t:t[0]) return TokenConverter(expr).addParseAction(lambda t:t[0])
def locatedExpr(expr): def locatedExpr(expr):
"""Helper to decorate a returned token with its starting and ending """Helper to decorate a returned token with its starting and ending
@ -5361,7 +5388,9 @@ downcaseTokens = tokenMap(lambda t: _ustr(t).lower())
"""(Deprecated) Helper parse action to convert tokens to lower case. """(Deprecated) Helper parse action to convert tokens to lower case.
Deprecated in favor of :class:`pyparsing_common.downcaseTokens`""" Deprecated in favor of :class:`pyparsing_common.downcaseTokens`"""
def _makeTags(tagStr, xml): def _makeTags(tagStr, xml,
suppress_LT=Suppress("<"),
suppress_GT=Suppress(">")):
"""Internal helper to construct opening and closing tag expressions, given a tag name""" """Internal helper to construct opening and closing tag expressions, given a tag name"""
if isinstance(tagStr,basestring): if isinstance(tagStr,basestring):
resname = tagStr resname = tagStr
@ -5372,22 +5401,28 @@ def _makeTags(tagStr, xml):
tagAttrName = Word(alphas,alphanums+"_-:") tagAttrName = Word(alphas,alphanums+"_-:")
if (xml): if (xml):
tagAttrValue = dblQuotedString.copy().setParseAction( removeQuotes ) tagAttrValue = dblQuotedString.copy().setParseAction( removeQuotes )
openTag = Suppress("<") + tagStr("tag") + \ openTag = (suppress_LT
Dict(ZeroOrMore(Group( tagAttrName + Suppress("=") + tagAttrValue ))) + \ + tagStr("tag")
Optional("/",default=[False]).setResultsName("empty").setParseAction(lambda s,l,t:t[0]=='/') + Suppress(">") + Dict(ZeroOrMore(Group(tagAttrName + Suppress("=") + tagAttrValue )))
+ Optional("/", default=[False])("empty").setParseAction(lambda s,l,t:t[0]=='/')
+ suppress_GT)
else: else:
printablesLessRAbrack = "".join(c for c in printables if c not in ">") tagAttrValue = quotedString.copy().setParseAction( removeQuotes ) | Word(printables, excludeChars=">")
tagAttrValue = quotedString.copy().setParseAction( removeQuotes ) | Word(printablesLessRAbrack) openTag = (suppress_LT
openTag = Suppress("<") + tagStr("tag") + \ + tagStr("tag")
Dict(ZeroOrMore(Group( tagAttrName.setParseAction(downcaseTokens) + \ + Dict(ZeroOrMore(Group(tagAttrName.setParseAction(downcaseTokens)
Optional( Suppress("=") + tagAttrValue ) ))) + \ + Optional(Suppress("=") + tagAttrValue))))
Optional("/",default=[False]).setResultsName("empty").setParseAction(lambda s,l,t:t[0]=='/') + Suppress(">") + Optional("/",default=[False])("empty").setParseAction(lambda s,l,t:t[0]=='/')
closeTag = Combine(_L("</") + tagStr + ">") + suppress_GT)
closeTag = Combine(_L("</") + tagStr + ">", adjacent=False)
openTag = openTag.setResultsName("start"+"".join(resname.replace(":"," ").title().split())).setName("<%s>" % resname) openTag.setName("<%s>" % resname)
closeTag = closeTag.setResultsName("end"+"".join(resname.replace(":"," ").title().split())).setName("</%s>" % resname) # add start<tagname> results name in parse action now that ungrouped names are not reported at two levels
openTag.addParseAction(lambda t: t.__setitem__("start"+"".join(resname.replace(":"," ").title().split()), t.copy()))
closeTag = closeTag("end"+"".join(resname.replace(":"," ").title().split())).setName("</%s>" % resname)
openTag.tag = resname openTag.tag = resname
closeTag.tag = resname closeTag.tag = resname
openTag.tag_body = SkipTo(closeTag())
return openTag, closeTag return openTag, closeTag
def makeHTMLTags(tagStr): def makeHTMLTags(tagStr):
@ -5852,12 +5887,17 @@ def indentedBlock(blockStatementExpr, indentStack, indent=True):
':', ':',
[[['def', 'eggs', ['(', 'z', ')'], ':', [['pass']]]]]]] [[['def', 'eggs', ['(', 'z', ')'], ':', [['pass']]]]]]]
""" """
backup_stack = indentStack[:]
def reset_stack():
indentStack[:] = backup_stack
def checkPeerIndent(s,l,t): def checkPeerIndent(s,l,t):
if l >= len(s): return if l >= len(s): return
curCol = col(l,s) curCol = col(l,s)
if curCol != indentStack[-1]: if curCol != indentStack[-1]:
if curCol > indentStack[-1]: if curCol > indentStack[-1]:
raise ParseFatalException(s,l,"illegal nesting") raise ParseException(s,l,"illegal nesting")
raise ParseException(s,l,"not a peer entry") raise ParseException(s,l,"not a peer entry")
def checkSubIndent(s,l,t): def checkSubIndent(s,l,t):
@ -5885,6 +5925,7 @@ def indentedBlock(blockStatementExpr, indentStack, indent=True):
else: else:
smExpr = Group( Optional(NL) + smExpr = Group( Optional(NL) +
(OneOrMore( PEER + Group(blockStatementExpr) + Optional(NL) )) ) (OneOrMore( PEER + Group(blockStatementExpr) + Optional(NL) )) )
smExpr.setFailAction(lambda a, b, c, d: reset_stack())
blockStatementExpr.ignore(_bslash + LineEnd()) blockStatementExpr.ignore(_bslash + LineEnd())
return smExpr.setName('indented block') return smExpr.setName('indented block')

0
src/pip/_vendor/urllib3/__init__.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/_collections.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/connection.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/connectionpool.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/contrib/__init__.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/contrib/_appengine_environ.py Executable file → Normal file
View File

View File

View File

View File

0
src/pip/_vendor/urllib3/contrib/appengine.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/contrib/ntlmpool.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/contrib/pyopenssl.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/contrib/securetransport.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/contrib/socks.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/exceptions.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/fields.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/filepost.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/packages/__init__.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/packages/backports/__init__.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/packages/backports/makefile.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/packages/six.py Executable file → Normal file
View File

View File

View File

0
src/pip/_vendor/urllib3/poolmanager.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/request.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/response.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/util/__init__.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/util/connection.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/util/queue.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/util/request.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/util/response.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/util/retry.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/util/ssl_.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/util/timeout.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/util/url.py Executable file → Normal file
View File

0
src/pip/_vendor/urllib3/util/wait.py Executable file → Normal file
View File

View File

@ -2,7 +2,7 @@ appdirs==1.4.3
CacheControl==0.12.5 CacheControl==0.12.5
colorama==0.4.1 colorama==0.4.1
distlib==0.2.8 distlib==0.2.8
distro==1.3.0 distro==1.4.0
html5lib==1.0.1 html5lib==1.0.1
ipaddress==1.0.22 # Only needed on 2.6 and 2.7 ipaddress==1.0.22 # Only needed on 2.6 and 2.7
lockfile==0.12.2 lockfile==0.12.2
@ -10,14 +10,14 @@ msgpack==0.5.6
packaging==19.0 packaging==19.0
pep517==0.5.0 pep517==0.5.0
progress==1.5 progress==1.5
pyparsing==2.3.1 pyparsing==2.4.0
pytoml==0.1.20 pytoml==0.1.20
requests==2.21.0 requests==2.21.0
certifi==2018.11.29 certifi==2019.3.9
chardet==3.0.4 chardet==3.0.4
idna==2.8 idna==2.8
urllib3==1.24.1 urllib3==1.24.1
retrying==1.3.3 retrying==1.3.3
setuptools==40.6.3 setuptools==41.0.1
six==1.12.0 six==1.12.0
webencodings==0.5.1 webencodings==0.5.1