Closed yajo closed 2 years ago
I found this, that should help to know what makes a string parseable into pep440: https://github.com/pypa/packaging/blob/d59efa2141210447ae21c4d48813d720e0d1dbfd/packaging/version.py#L225-L254
Hi! Sorry for the late response, and thanks for pointing this out. I'll definitely relax ^v(?P<base>\d+\.\d+\.\d+)
to ^v(?P<base>\d+(\.\d+)*)
, since that was an oversight. The v
prefix was a conscious decision, though, to avoid false positives from things like ticket ID-based tags, so I would consider that a backwards-incompatible change. I think the pattern should be general enough so that it doesn't need different defaults for different versioning systems, but I would be open to adding extra defaults if there's a clear need.
As a workaround, there's the possibility to pass a custom pattern if running from python:
For reference, this is also available from the command line as --pattern
.
This is now fixed in 1.6.0.
See this session:
It seems that even when I add
--style pep440
to the command, dunamai only tries to find tags formatted with semver, because it's using this regexp:https://github.com/mtkennerly/dunamai/blob/14a9891217a0c09da3745f1403a9ea3c54310a85/dunamai/__init__.py#L26-L31
With that regexp for example, these tags would fail:
So I think that it should:
v
be optionalAs a workaround, there's the possibility to pass a custom pattern if running from python:
https://github.com/mtkennerly/dunamai/blob/14a9891217a0c09da3745f1403a9ea3c54310a85/dunamai/__init__.py#L851-L857