Backport: Don't put an underscore in Python 3.10 compatibility tag

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1999035
This commit is contained in:
Miro Hrončok 2021-08-30 12:11:06 +02:00
commit 3fea8c719c
2 changed files with 43 additions and 1 deletions

View file

@ -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 <mhroncok@redhat.com> - 20.2.2-3
- Properly recognize Python 3.10 wheel tags
- Fixes: rhbz#1999035
* Mon May 17 2021 Karolina Surma <ksurma@redhat.com> - 20.2.2-2
- Backport security fix from pip 21.1.1

View file

@ -0,0 +1,33 @@
From a6253448766965e34f1d0dd58cdf317790d25dd7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
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 <pradyunsg@users.noreply.github.com>
---
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):