Skip to content

Commit

Permalink
Merge pull request #9278 from gpiks/update_vendoring_packages
Browse files Browse the repository at this point in the history
Update packaging to version 20.8
  • Loading branch information
pradyunsg committed Dec 14, 2020
2 parents 94b89c9 + 6b2ccdd commit cfa013b
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 15 deletions.
1 change: 1 addition & 0 deletions news/packaging.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update vendoring to 20.8
27 changes: 27 additions & 0 deletions src/pip/_vendor/packaging/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function

__all__ = [
"__title__",
"__summary__",
"__uri__",
"__version__",
"__author__",
"__email__",
"__license__",
"__copyright__",
]

__title__ = "packaging"
__summary__ = "Core utilities for Python packages"
__uri__ = "https://github.com/pypa/packaging"

__version__ = "20.8"

__author__ = "Donald Stufft and individual contributors"
__email__ = "donald@stufft.io"

__license__ = "BSD-2-Clause or Apache-2.0"
__copyright__ = "2014-2019 %s" % __author__
25 changes: 23 additions & 2 deletions src/pip/_vendor/packaging/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
"""Core utilities for Python packages"""
__version__ = "20.7"
from __future__ import absolute_import, division, print_function

from .__about__ import (
__author__,
__copyright__,
__email__,
__license__,
__summary__,
__title__,
__uri__,
__version__,
)

__all__ = [
"__title__",
"__summary__",
"__uri__",
"__version__",
"__author__",
"__email__",
"__license__",
"__copyright__",
]
12 changes: 6 additions & 6 deletions src/pip/_vendor/packaging/requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


if TYPE_CHECKING: # pragma: no cover
from typing import List
from typing import List, Optional as TOptional, Set


class InvalidRequirement(ValueError):
Expand Down Expand Up @@ -109,7 +109,7 @@ def __init__(self, requirement_string):
)
)

self.name = req.name
self.name = req.name # type: str
if req.url:
parsed_url = urlparse.urlparse(req.url)
if parsed_url.scheme == "file":
Expand All @@ -119,12 +119,12 @@ def __init__(self, requirement_string):
not parsed_url.scheme and not parsed_url.netloc
):
raise InvalidRequirement("Invalid URL: {0}".format(req.url))
self.url = req.url
self.url = req.url # type: TOptional[str]
else:
self.url = None
self.extras = set(req.extras.asList() if req.extras else [])
self.specifier = SpecifierSet(req.specifier)
self.marker = req.marker if req.marker else None
self.extras = set(req.extras.asList() if req.extras else []) # type: Set[str]
self.specifier = SpecifierSet(req.specifier) # type: SpecifierSet
self.marker = req.marker if req.marker else None # type: TOptional[Marker]

def __str__(self):
# type: () -> str
Expand Down
8 changes: 2 additions & 6 deletions src/pip/_vendor/packaging/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def _mac_binary_formats(version, cpu_arch):
if cpu_arch in {"arm64", "x86_64"}:
formats.append("universal2")

if cpu_arch in {"x86_64", "i386", "ppc64", "ppc"}:
if cpu_arch in {"x86_64", "i386", "ppc64", "ppc", "intel"}:
formats.append("universal")

return formats
Expand Down Expand Up @@ -827,11 +827,7 @@ def interpreter_version(**kwargs):

def _version_nodot(version):
# type: (PythonVersion) -> str
if any(v >= 10 for v in version):
sep = "_"
else:
sep = ""
return sep.join(map(str, version))
return "".join(map(str, version))


def sys_tags(**kwargs):
Expand Down
2 changes: 1 addition & 1 deletion src/pip/_vendor/vendor.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ distro==1.5.0
html5lib==1.1
ipaddress==1.0.23 # Only needed on 2.6 and 2.7
msgpack==1.0.0
packaging==20.7
packaging==20.8
pep517==0.9.1
progress==1.5
pyparsing==2.4.7
Expand Down

0 comments on commit cfa013b

Please sign in to comment.