#19 [DRAFT] Don't put an underscore in the version portion of Python 3.10 compatibility tags
Closed 3 months ago by churchyard. Opened 5 months ago by churchyard.
rpms/ churchyard/python-wheel 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/wheel/vendored/packaging/tags.py  |  5 +---

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

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

+ 

+ diff --git a/src/wheel/vendored/packaging/tags.py b/src/wheel/vendored/packaging/tags.py

+ index 289ed5c..454966f 100644

+ --- a/src/wheel/vendored/packaging/tags.py

+ +++ b/src/wheel/vendored/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
+10 -1
@@ -19,7 +19,7 @@ 

  

  Name:           python-%{pypi_name}

  Version:        0.35.1

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Epoch:          1

  Summary:        Built-package format for Python

  
@@ -29,6 +29,10 @@ 

  Source0:        %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz

  BuildArch:      noarch

  

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

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

+ Patch1:         355.patch

+ 

  BuildRequires:  python%{python3_pkgversion}-devel

  BuildRequires:  python%{python3_pkgversion}-setuptools

  
@@ -130,6 +134,11 @@ 

  %endif

  

  %changelog

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

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

+ - Resolves: rhbz#1891840

+ - Resolves: rhbz#1899553

+ 

  * Thu Sep 10 2020 Tomas Hrnciar <thrnciar@redhat.com> - 1:0.35.1-1

  - Update to 0.35.1

  - Fixes: rhbz#1868821

Until (and unless) PEP 641 is approved and implemented, I've built this in our copr to unblock ourselves from the mess.

This is also present in pip: https://src.fedoraproject.org/rpms/python-pip/pull-request/74

Build succeeded.

Pull-Request has been closed by churchyard

3 months ago