-
Notifications
You must be signed in to change notification settings - Fork 244
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
Provide a way to instantiate a version quickly when the parsed content is known #590
Comments
We are purposefully a pure Python project for bootstrapping purposes, so shifting to something that requires C code isn't an option (i.e. we have to be able to be vendored into pip which needs to be able to be shipped as a zipapp). As for providing a class that skips the string parse, I would be okay with combining Hindsight suggest it would have been good to have a classmethod instead of always parsing (although we have |
I think what was implied by the Mypyc/Cython suggestion is for the project to stay Python-only, but publish additional wheels for those pre-compiled code. Projects that want a pure Python version can still use the |
Yes, im. Very well aware of the vendoring needs, however those are not necessarily in conflict with providing speed up wheels when using tools like mypyc As for providing a non parsing api, I'll experiment with providing one |
True, but it does increase maintenance burden and I don't know if it's worth it in this case. Plus I come from the camp of preferring to try and speed up Python or be okay with the performance than work around it with more native code.
👍 |
users of setuptools_scm like to expose their version variables, unfortunately importing Version, loading it to compile the regex and parsing the version string is often a cost they don't want to pay,
so the safe default has to stay version strings and/or mixed type version tuples
i'd like to be able to expose Version instances there at a reasonable cost
for that to happen i believe whats needed is
a) a mypyc'd or cythonized version module thats practically importing at no cost
b) a way to instantiate a version without incurring the regex compile + parse cost
it may help to migrate to hatch while at it as it has tools to handle mypyc and cibuildwheel
The text was updated successfully, but these errors were encountered: