Skip to content

Commit 48f90da

Browse files
committed
Upgrade packaging to 20.3
1 parent 98b3221 commit 48f90da

File tree

3 files changed

+23
-14
lines changed

3 files changed

+23
-14
lines changed

src/pip/_vendor/packaging/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
__summary__ = "Core utilities for Python packages"
1919
__uri__ = "https://github.com/pypa/packaging"
2020

21-
__version__ = "20.1"
21+
__version__ = "20.3"
2222

2323
__author__ = "Donald Stufft and individual contributors"
2424
__email__ = "[email protected]"

src/pip/_vendor/packaging/tags.py

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def _cpython_abis(py_version, warn=False):
162162
# type: (PythonVersion, bool) -> List[str]
163163
py_version = tuple(py_version) # To allow for version comparison.
164164
abis = []
165-
version = "{}{}".format(*py_version[:2])
165+
version = _version_nodot(py_version[:2])
166166
debug = pymalloc = ucs4 = ""
167167
with_debug = _get_config_var("Py_DEBUG", warn)
168168
has_refcount = hasattr(sys, "gettotalrefcount")
@@ -221,10 +221,7 @@ def cpython_tags(
221221
if not python_version:
222222
python_version = sys.version_info[:2]
223223

224-
if len(python_version) < 2:
225-
interpreter = "cp{}".format(python_version[0])
226-
else:
227-
interpreter = "cp{}{}".format(*python_version[:2])
224+
interpreter = "cp{}".format(_version_nodot(python_version[:2]))
228225

229226
if abis is None:
230227
if len(python_version) > 1:
@@ -252,8 +249,8 @@ def cpython_tags(
252249
if _abi3_applies(python_version):
253250
for minor_version in range(python_version[1] - 1, 1, -1):
254251
for platform_ in platforms:
255-
interpreter = "cp{major}{minor}".format(
256-
major=python_version[0], minor=minor_version
252+
interpreter = "cp{version}".format(
253+
version=_version_nodot((python_version[0], minor_version))
257254
)
258255
yield Tag(interpreter, "abi3", platform_)
259256

@@ -305,11 +302,11 @@ def _py_interpreter_range(py_version):
305302
all previous versions of that major version.
306303
"""
307304
if len(py_version) > 1:
308-
yield "py{major}{minor}".format(major=py_version[0], minor=py_version[1])
305+
yield "py{version}".format(version=_version_nodot(py_version[:2]))
309306
yield "py{major}".format(major=py_version[0])
310307
if len(py_version) > 1:
311308
for minor in range(py_version[1] - 1, -1, -1):
312-
yield "py{major}{minor}".format(major=py_version[0], minor=minor)
309+
yield "py{version}".format(version=_version_nodot((py_version[0], minor)))
313310

314311

315312
def compatible_tags(
@@ -636,8 +633,11 @@ def _have_compatible_manylinux_abi(arch):
636633
def _linux_platforms(is_32bit=_32_BIT_INTERPRETER):
637634
# type: (bool) -> Iterator[str]
638635
linux = _normalize_string(distutils.util.get_platform())
639-
if linux == "linux_x86_64" and is_32bit:
640-
linux = "linux_i686"
636+
if is_32bit:
637+
if linux == "linux_x86_64":
638+
linux = "linux_i686"
639+
elif linux == "linux_aarch64":
640+
linux = "linux_armv7l"
641641
manylinux_support = []
642642
_, arch = linux.split("_", 1)
643643
if _have_compatible_manylinux_abi(arch):
@@ -704,10 +704,19 @@ def interpreter_version(**kwargs):
704704
if version:
705705
version = str(version)
706706
else:
707-
version = "".join(map(str, sys.version_info[:2]))
707+
version = _version_nodot(sys.version_info[:2])
708708
return version
709709

710710

711+
def _version_nodot(version):
712+
# type: (PythonVersion) -> str
713+
if any(v >= 10 for v in version):
714+
sep = "_"
715+
else:
716+
sep = ""
717+
return sep.join(map(str, version))
718+
719+
711720
def sys_tags(**kwargs):
712721
# type: (bool) -> Iterator[Tag]
713722
"""

src/pip/_vendor/vendor.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ distro==1.4.0
77
html5lib==1.0.1
88
ipaddress==1.0.23 # Only needed on 2.6 and 2.7
99
msgpack==0.6.2
10-
packaging==20.1
10+
packaging==20.3
1111
pep517==0.7.0
1212
progress==1.5
1313
pyparsing==2.4.6

0 commit comments

Comments
 (0)