"+" suffix in 3.9.0+ breaks pip

Bug #1905064 reported by Cédric Cabessa
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python3.9 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

python3.9 in focal is versioned as 3.9.0+

According to pip this is considered as a "LegacyVersion", which break comparison

https://github.com/pypa/pip/blob/20.2.4/src/pip/_vendor/packaging/version.py#L48

Here is a snippet that show the "+" break comparison

```
>>> from pip._vendor.packaging.version import parse
>>> parse("3.9.0+")
<LegacyVersion('3.9.0+')>
>>> parse("3.9.0")
<Version('3.9.0')>
>>> parse("3.9.0+") >= parse("3.6.0")
False
>>> parse("3.9.0") >= parse("3.6.0")
True
>>>
```

Is it possible to mark this version as 3.9.0 ?
It seems the plus is introduced by a debian patch.

Thank you

Revision history for this message
Gert van Dijk (gertvdijk) wrote :

It seems this version string was introduced in a upstream Debian patch indeed, when it was based on a prerelease version of Python 3.9. The patch (git-updates.diff) was dropped later.

Introduced (erroneously):
https://salsa.debian.org/cpython-team/python3/-/commit/5334a0144db8e35afa8ae898d0dbd06afa426ccb

Removed:
https://salsa.debian.org/cpython-team/python3/-/commit/7952d9ce65aa51d6a23107ce1e30d0d92b1e15c7

Please backport the updated Debian-packaged Python 3.9 to Ubuntu.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python3.9 (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.