diff --git a/python-pip.spec b/python-pip.spec index b1888d3..b364d8b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -19,7 +19,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -99,6 +99,11 @@ Patch5: nowarn-pip._internal.main.patch # Upstream PR: https://github.com/pypa/pip/pull/9827 Patch8: don-t-split-git-references-on-unicode-separators.patch +# Don't put an underscore in the version portion of Python 3.10 compatibility tags +# From https://github.com/pypa/packaging/pull/355 (merged upstream) +# Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1999035 +Patch9: python3.10-abi-tag-fix.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -408,6 +413,10 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Mon Aug 30 2021 Miro HronĨok - 20.2.2-3 +- Properly recognize Python 3.10 wheel tags +- Fixes: rhbz#1999035 + * Mon May 17 2021 Karolina Surma - 20.2.2-2 - Backport security fix from pip 21.1.1 diff --git a/python3.10-abi-tag-fix.patch b/python3.10-abi-tag-fix.patch new file mode 100644 index 0000000..a1399af --- /dev/null +++ b/python3.10-abi-tag-fix.patch @@ -0,0 +1,33 @@ +From a6253448766965e34f1d0dd58cdf317790d25dd7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Tue, 24 Nov 2020 12:06:14 +0100 +Subject: [PATCH] Don't put an underscore in the version portion of Python 3.10 + compatibility tags + +PEP 641 is rejected. + +See https://discuss.python.org/t/5513/42 +See https://www.python.org/dev/peps/pep-0641/ + +Fixes https://github.com/pypa/packaging/issues/372 + +Co-authored-by: Pradyun Gedam +--- + +diff --git a/src/pip/_vendor/packaging/tags.py b/src/pip/_vendor/packaging/tags.py +index 9064910..5d901e9 100644 +--- a/src/pip/_vendor/packaging/tags.py ++++ b/src/pip/_vendor/packaging/tags.py +@@ -722,11 +722,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):