-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: incorrect version number generated in distributions #506
Comments
Closes cherrypy#506 The distribution package number is reused as Python package version. This leads to errors in distutils.version.StrictVersion like ValueError: invalid version number '8.6.0+ds1' Use a regular expression to extract a valid version number. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Closes cherrypy#506 The distribution package number is reused as Python package version. This leads to errors in distutils.version.StrictVersion like ValueError: invalid version number '8.6.0+ds1' Use a regular expression to extract a valid version number. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This is a misconception. Look into PEP 440, find a "local version" there and you'll see that it's perfectly fine to have it. Moreover, the specific use-case is for downstream packagers to encode their patches like that, or for SCM metadata to be appended. In our case, we rely on setuptools-scm to generate intermediate version numbers which also adds a Git commit sha in some cases.
This is because you used a
Looking at this, I can say that the bug is not ours. The proper upstream to report it to is Ceph: File "/usr/share/ceph/mgr/dashboard/cherrypy_backports.py", line 124, in accept_socket_error_0 |
Debian and Ubuntu user package versions like 8.6.0-ds1 which are fine for *.deb packages but not legal according to PEP440.
In cheroot/init.py:13: the Debian package number is misused as Python package version.
This leads to errors like the following
It would be preferable to sanitize the string returned by pkg_resources.get_distribution('cheroot').version.
Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1010894
Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1967139
Best regards
Heinrich
The text was updated successfully, but these errors were encountered: