bug: PEP440 compliant versions are no longer allowed since git-changelog version 2.4.1
robin-vagner opened this issue ยท 5 comments
Description of the bug
We have packages with versions such as 0.2.0.post1
, which are PEP440 compliant versions.
git-changelog worked fine with these before, but since version 2.4.1 we get this error :
git-changelog: 0.2.0.post2 is not valid SemVer string
I guess the error message is right since our versioning is based on python's pep440 and not semantic versioning, but still I don't think this is desired behavior.
If this was intended, then maybe a command-line argument to specify the versioning pattern would be useful ?
To Reproduce
Create a tag with a PEP440 specific version (0.2.0.post1
for example), then run git-changelog
.
Full traceback
There is no traceback, just this error message : git-changelog: 0.2.0.post2 is not valid SemVer string
.
Environment information
- __System__: Windows-10-10.0.19045-SP0
- __Python__: cpython 3.9.13
- __Environment variables__:
- __Installed packages__:
- `git-changelog` v2.4.1
Hello, thanks for the report, and very sorry for the breaking change! This comes from here: f191ed7#diff-b4ea8efb43c6c51f5b59739374543530fe358728677ca8203462aacb4d9cfad2R457. Where previously we would only use the semver
library when bumping versions, we are now using it to compare versions in order to correctly group commits. That was an oversight, and it shows we have missing tests in our test suite ๐
I'll fix this asap!
Thank you very much, in the meantime we froze our git-changelog version so there is no particular rush on our end ๐
Work in progress here: #80. I thought it was time to officially support PEP 440, not just SemVer. This will also allow us to support CalVer later, and maybe custom versioning schemes at some point.
OK this should be fixed in v2.5.0. See https://pawamoy.github.io/git-changelog/usage/#choose-a-versioning-scheme. Let me know if this new version works for you, or if you encounter any other issue! I'll do my best to fix them ๐
Just tried it out, it works perfectly. Thanks :)