-
Notifications
You must be signed in to change notification settings - Fork 254
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
Local version identifiers parse as legacy version #356
Comments
Local version identifiers can be parsed correctly: >>> from packaging import version
>>> version.parse('4.0.0a2.dev79+g7a07b5b.d20201128')
<Version('4.0.0a2.dev79+g7a07b5b.d20201128')> But PEP 440 says that:
Your specifier is therefore not a valid PEP 440 version specifier, and thus parsed as legacy. |
Eh, ok. So why would it not be a valid case to have a local version identifier within a version specifier? |
I don’t know. My guess is that since the local version segment has no ordering, it does not make sense to do comparison on them (which would incorrectly hint that they have a part in the comparison logic). |
I guess only |
cc @di @pradyunsg
Even though https://www.python.org/dev/peps/pep-0440/#local-version-identifiers makes the version above valid. https://pypi.org/project/setuptools-scm/ is generating such versions. Especially important due to #321
The text was updated successfully, but these errors were encountered: