-
Notifications
You must be signed in to change notification settings - Fork 97
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
Semver versioning is incompatible with pypi dist cleansing #335
Comments
Hi @KitBurgess thanks for your report, much appreciated. 👍 Well, I fear, your example is not a valid semver version. According to the semver specification, version core (the major, minor, patch part) is separated by a "-" (dash) from the prerelease If you change your example to "3.0.0-dev0" this would be a valid semver version and accepted. Hope this helps. |
Happy new year! 🎉 😁 Maybe I completely misunderstood your intention, but here is a second thought. This is indeed an invalid semver version. However, I can't influence that as it is created automatically by If you want to convert such versions, you could do that with the >>> from packaging import version
>>> from semver import VersionInfo
>>> v = version.Version("3.0.0.dev2")
>>> VersionInfo(*v.release, prerelease="dev.%s" % v.dev)
VersionInfo(major=3, minor=0, patch=0, prerelease='dev.2', build=None I think, it could be a helpful addition to our documentation. Would that help? |
Hi @KitBurgess, I've created a PR #352 based on our conversation, sorry for the delay. Would this help? If you like and have time, could you review the PR? That would be very helpful for me. Thanks! ❤️ |
As the PR is already merged and I didn't get any response, I assume it was okay. If there are still some questions, reopen it. Thanks! |
Situation
The Semver package doesn't correctly characterise versions, raising errors for valid semver tags.
To Reproduce
Expected Behavior
3.0.0.dev0 is a valid semver tag, no error should be thrown
Environment
Python3.7, semver 2.13.0
The text was updated successfully, but these errors were encountered: