-
Notifications
You must be signed in to change notification settings - Fork 96
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
Release candidate tags are sorted as higher than actual releases (0.8.0rc2 >> 0.8.0) #230
Comments
>>> from packaging.version import Version
>>> Version("0.8.0") > Version("0.8.0rc2")
True |
Maybe, but not in the rest of the world. dpkg, and probably rpm too, do not follow that custom rule. |
If we don't follow PEP 440, installation tools like This issue has been discussed before: paylogic/py2deb#8. Also, according to Debian New Maintainers' Guide / 2. First steps / 2.6. Package name and version,
|
I know perfectly well that there are workarounds, and in fact I am already using them - but they are workarounds, not solutions, that create additional work downstream. Please consider using a scheme that works everywhere, regardless of what PEP440 says, given it's clearly incompatible with what the rest of the world does. |
PEP 440 is the official spec of Python versioning. If we don't follow it but switch to Debian versioning, Python's libs will fail to recognize the version: >>> from packaging.version import Version
>>> Version("0.8.0~rc2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\<name>\AppData\Local\Programs\Python\Python38\lib\site-packages\packaging\version.py", line 298, in __init__
raise InvalidVersion("Invalid version: '{0}'".format(version))
packaging.version.InvalidVersion: Invalid version: '0.8.0~rc2' You may open a discussion on https://discuss.python.org for PEP 440. |
There are alternatives that work everywhere. For example, instead of |
I understand your concern @bluca. However, as a Python tool, it would be better for us to follow the naming convention of Python community, like other Python tools do. pip: https://pypi.org/project/pip/#history numpy: https://pypi.org/project/numpy/#history PyYAML: https://pypi.org/project/PyYAML/#history Thanks for the understanding. |
Please use a
~
when appendingrcX
to a tag. All software that does version comparison will consider 0.8.0 as being lower/older than 0.8.0rc2.The text was updated successfully, but these errors were encountered: