#74 [DRAFT] Don't put an underscore in the version portion of Python 3.10 compatibility tags
Closed 3 years ago by churchyard. Opened 3 years ago by churchyard.
rpms/ churchyard/python-pip tag_no_underscore  into  master

file added
+30
@@ -0,0 +1,30 @@ 

+ From 323a0d5cb6047f518dcab468a1b491f697c57176 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

+ 

+ This is if PEP 641 is rejected.

+ 

+ See https://www.python.org/dev/peps/pep-0641/

+ ---

+  src/pip/_vendor/packaging/tags.py  |  5 +---

+  tests/test_tags.py | 66 +++++++++++++++++++++++-----------------------

+  2 files changed, 34 insertions(+), 37 deletions(-)

+ 

+ diff --git a/src/pip/_vendor/packaging/tags.py b/src/pip/_vendor/packaging/tags.py

+ index 289ed5c..454966f 100644

+ --- a/src/pip/_vendor/packaging/tags.py

+ +++ b/src/pip/_vendor/packaging/tags.py

+ @@ -795,10 +795,7 @@ def interpreter_version(**kwargs):

+  

+  def _version_nodot(version):

+      # type: (PythonVersion) -> str

+ -    if any(v >= 10 for v in version):

+ -        sep = "_"

+ -    else:

+ -        sep = ""

+ +    sep = ""

+      return sep.join(map(str, version))

+  

+  

file modified
+8 -1
@@ -19,7 +19,7 @@ 

  # 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:        1%{?dist}

+ Release:        2%{?dist}

  Summary:        A tool for installing and managing Python packages

  

  # We bundle a lot of libraries with pip, which itself is under MIT license.
@@ -93,6 +93,10 @@ 

  # this warning is juts moot. Also, the warning breaks CPython test suite.

  Patch5:         nowarn-pip._internal.main.patch

  

+ # Don't put an underscore in the version portion of Python 3.10 compatibility tags

+ # https://github.com/pypa/packaging/pull/355

+ Patch6:         355.patch

+ 

  # Downstream only patch

  # Users might have local installations of pip from using

  # `pip install --user --upgrade pip` on older/newer versions.
@@ -403,6 +407,9 @@ 

  %{python_wheeldir}/%{python_wheelname}

  

  %changelog

+ * Tue Nov 24 2020 Miro Hrončok <mhroncok@redhat.com> - 20.2.4-2

+ - Don't put an underscore in the version portion of Python 3.10 compatibility tags

+ 

  * Mon Oct 19 2020 Lumír Balhar <lbalhar@redhat.com> - 20.2.4-1

  - Update to 20.2.4 (#1889112)

  

I've built this in our python3.10 copr to unblock/test python-xmlsec.

Build succeeded.

This is included in 20.3.3.

Pull-Request has been closed by churchyard

3 years ago