-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
AttributeError: 'NoneType' object has no attribute 'groups' if tag has the wrong syntax #471
Comments
Actually, where can I find the default syntax rules (with examples) for release tags? I can't figure out why 2.0.0-alpha.5-PMC is not allowed (well, it's not even clear it's not allowed, it just crashes), and alternatively what would be allowed instead (short of trying by trial and error) |
https://github.com/pypa/setuptools_scm/blob/master/src/setuptools_scm/config.py#L9 has the default stuff for something thats clearly not a valid python package version number we should have a better error |
Thanks for digging this up! However my offending tag |
@plijnzaad thanks for calling me out, now that i'm looking a closer look i'm seeing what i missed the default implementation for version bumping is too simplicistic and completely falls appart with propperly finding the point where to add a number setuptools_scm should warn/error in a more comprehensible way when the version that is still "accepted" is not actually handleable by the bump helper itself if you have a tool for determining the next version you can hook it in |
…n-broken-bump fix #471: better error when a simplicistic version bump fails
(I created this issue over in the setuptools repo (see https://github.com/pypa/setuptools/issues/2326 ) but I realize that it should actually be here, sorry)
I happened to have a git tag of the wrong syntax, namely 2.0.0-alpha.5-PMC, leading to the above error. It was very difficult to track down for a lowly end-user of a package (atropos) that uses it, and which I forked in order to fix a few things. I did not know that tags were needed, let alone be of a very specific shape (and 2.0.0-alpha.5-PMC is not that extreme, right?) .
I have appended the stdout and stderr before git tag --delete 2.0.0-alpha.5-PMC (std*-bad.txt) and after deleting the offending tag (std*-good.txt) (done with export SETUPTOOLS_SCM_DEBUG=verbose)
stdout-bad.txt
stderr-bad.txt
stdout-good.txt
stderr-good.txt
I tried various older versions of setuptools-scm (back to 2.0.0 I recall correctly), all had the same or similar problem. I see several reports of people having similar trouble so it appears to be a general problem and one that occurs more often. I would love if this were more robust, i.e. I'd much rather have a version string 'unknown' or somesuch than a package that refuses to install ...
Cheers,
P
The text was updated successfully, but these errors were encountered: