Invalid PEP440 package version breaking setuptools >= 66
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
devscripts (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Bionic |
New
|
Undecided
|
Unassigned | ||
Focal |
New
|
Undecided
|
Unassigned | ||
Jammy |
New
|
Undecided
|
Unassigned | ||
Kinetic |
Won't Fix
|
Undecided
|
Unassigned | ||
distro-info (Ubuntu) |
Fix Released
|
High
|
Benjamin Drung | ||
Bionic |
New
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Kinetic |
Fix Released
|
Undecided
|
Unassigned | ||
dput (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
New
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Kinetic |
Fix Released
|
Undecided
|
Unassigned | ||
Lunar |
Fix Released
|
Undecided
|
Unassigned | ||
drslib (Ubuntu) |
New
|
High
|
Unassigned | ||
Bionic |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
New
|
Undecided
|
Unassigned | ||
Jammy |
New
|
Undecided
|
Unassigned | ||
Kinetic |
Won't Fix
|
Undecided
|
Unassigned | ||
duecredit (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Bionic |
New
|
Undecided
|
Unassigned | ||
Focal |
New
|
Undecided
|
Unassigned | ||
Jammy |
New
|
Undecided
|
Unassigned | ||
Kinetic |
Won't Fix
|
Undecided
|
Unassigned | ||
gpgme1.0 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
New
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Kinetic |
Fix Released
|
Undecided
|
Unassigned | ||
python-debian (Ubuntu) |
Fix Released
|
High
|
Benjamin Drung | ||
Bionic |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Kinetic |
Fix Released
|
Undecided
|
Unassigned | ||
reportbug (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Bionic |
New
|
Undecided
|
Unassigned | ||
Focal |
New
|
Undecided
|
Unassigned | ||
Jammy |
New
|
Undecided
|
Unassigned | ||
Kinetic |
Won't Fix
|
Undecided
|
Unassigned | ||
ubuntu-dev-tools (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Bionic |
New
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Invalid
|
Undecided
|
Unassigned | ||
Kinetic |
Invalid
|
Undecided
|
Unassigned | ||
update-manager (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
New
|
Undecided
|
Unassigned | ||
Focal |
New
|
Undecided
|
Unassigned | ||
Jammy |
New
|
Undecided
|
Unassigned | ||
Kinetic |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
[ Impact ]
With setuptools 66, the versions of all packages visible in the Python environment *must* obey PEP440 <https:/
File "/builds/
env = Environment(
File "/builds/
self.
File "/builds/
self.add(dist)
File "/builds/
dists.
File "/builds/
self.
File "/builds/
self.
File "/builds/
raise InvalidVersion(
pkg_resources.
The official opinion of the setuptools maintainers seems to be that version strings of this form haven't *really* been allowed since about 2014, and distributions need to change their package version naming scheme for Python packages they install, so that the resulting version strings obey PEP440. See for example <https:/
suffix 1build1 is invalid.
Some python building tools, that verifies if version strings are compatible with PEP440, are failing.
Example: python poetry: Invalid PEP 440 version: '1.1build1'
[ Test Plan ]
1.
$ mkdir /tmp/lp.1991606
$ export HOME=/tmp/
$ sudo apt install dput python3-pip
$ pip3 install -U setuptools
$ sudo apt install <broken package>
$ dput
This will produce a backtrace.
2. Enable -proposed
3. Upgrade <broken package> from proposed
4. dput
This will succeed.
[ Where problems could occur ]
The fix touches only setup.py which is only used for installing the package. So there should be no effect on the installed package (except for exposing a different version). But there could be indirect effects (hidden bugs that trigger on package upgrade, etc).
[ Other Info ]
The related upstream bug report is https:/
summary: |
- Invalid PEP440 package version + Invalid PEP440 package version breaking setuptools >= 60 |
description: | updated |
Changed in ubuntu-dev-tools (Ubuntu Kinetic): | |
status: | New → Invalid |
Changed in ubuntu-dev-tools (Ubuntu Jammy): | |
status: | New → Invalid |
tags: | added: regression-update |
Changed in distro-info (Ubuntu): | |
importance: | Medium → High |
Changed in devscripts (Ubuntu): | |
importance: | Undecided → High |
Changed in drslib (Ubuntu Bionic): | |
status: | New → Invalid |
Changed in python-debian (Ubuntu Kinetic): | |
status: | New → Invalid |
Changed in python-debian (Ubuntu Bionic): | |
status: | New → Invalid |
Changed in python-debian (Ubuntu): | |
importance: | Undecided → High |
Changed in duecredit (Ubuntu): | |
importance: | Undecided → High |
Changed in drslib (Ubuntu): | |
importance: | Undecided → High |
Changed in reportbug (Ubuntu): | |
importance: | Undecided → High |
Changed in ubuntu-dev-tools (Ubuntu): | |
importance: | Undecided → High |
Changed in python-debian (Ubuntu): | |
status: | New → Fix Committed |
Changed in reportbug (Ubuntu): | |
status: | New → Fix Committed |
Changed in duecredit (Ubuntu): | |
status: | New → Fix Committed |
tags: | added: foundations-todo |
summary: |
- Invalid PEP440 package version breaking setuptools >= 60 + Invalid PEP440 package version breaking setuptools >= 66 |
Changed in distro-info (Ubuntu Kinetic): | |
status: | New → Fix Released |
tags: | added: patch |
description: | updated |
description: | updated |
Changed in python-debian (Ubuntu): | |
assignee: | nobody → Benjamin Drung (bdrung) |
Changed in distro-info (Ubuntu): | |
assignee: | nobody → Benjamin Drung (bdrung) |
Changed in python-debian (Ubuntu Kinetic): | |
status: | Invalid → New |
Changed in python-debian (Ubuntu Kinetic): | |
status: | New → Incomplete |
Changed in gpgme1.0 (Ubuntu Kinetic): | |
status: | New → Fix Released |
Changed in gpgme1.0 (Ubuntu): | |
status: | New → Fix Released |
Changed in ubuntu-dev-tools (Ubuntu Focal): | |
status: | New → Fix Released |
description: | updated |
Changed in python-debian (Ubuntu Kinetic): | |
status: | Incomplete → Fix Committed |
tags: | added: verification-needed verification-needed-kinetic |
Changed in python-debian (Ubuntu Jammy): | |
status: | New → Fix Committed |
tags: | added: verification-needed-jammy |
Changed in python-debian (Ubuntu Focal): | |
status: | New → Fix Committed |
tags: | added: verification-needed-focal |
Changed in distro-info (Ubuntu Jammy): | |
status: | New → Fix Committed |
tags: |
added: verification-done verification-done-focal verification-done-jammy verification-done-kinetic removed: verification-needed verification-needed-focal verification-needed-jammy verification-needed-kinetic |
tags: | removed: foundations-todo |
Hi there, thanks for the report.
Debian and Ubuntu have a long-established package versioning scheme, so I'm not sure it's appropriate to expect those packages to change to conform to what PEP440 wants. But we may be able to do something within the building tools, such as your poetry example, in terms of how it reports distro package versions.
I'm not previously familiar with the python3-poetry package. Would you provide a set of steps to produce this problem using that? I see that one can do a "poetry new poetry-demo", which may assist in constructing a minimal test case.
Also, are there other affected python building tools?