Versions of the form "0.23ubuntu1" do not obey PEP440 and break current pip/setuptools
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
distro-info (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
reportbug (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
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:/
Therefore, the version of the `distro-info` package shipped in Focal cannot remain '0.23ubuntu1', at least as exposed to the Python environment in `python3-
Other versions of `distro-info` as shipped in other reasonably current Ubuntu versions would also need to be changed:
1.1build1 in Jammy
1.1ubuntu1 in Kinetic
Older Ubuntu releases that are still "supported" might also need changes.
As noted in <https:/ /github. com/pypa/ setuptools/ issues/ 3772#issuecomme nt-1385141558>, `python3-reportbug` ships a disallowed version string all the way up to Lunar.