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
Specifying __version__ using __import__("importlib.metadata")
?
#693
Comments
To further expand: ultimately, the complexity is finally removed when there is exactly one source of truth which the python build system and runtime pull from, using only stdlib. Regarding Just don't use |
I use setuptools-scm for my (non-js python) projects 🤣 |
I think tbump works well, and taking an approach like this doesn't solve a problem that we currently have. I think it's a fine approach to take, but since tbump takes care of it already while also covering the tagging & publishing workflow, it's adding dynamic logic that might be sensitive to unusual things like importing based on PYTHONPATH without installing, etc. where we currently have a simple string that always works.
I think importlib-metadata is probably a great pair for setuptools-scm, and it even recommends taking this approach, since it's how you have |
@consideRatio Could you say a bit more about the advantages of |
I don't advocate the approach if there is any possible issues, as tbump does a good job for us handling this. But the minor benefit I see is that our pyproject.toml's configuration of tbump no longer needs one specific entry.
I agree with this thought overall - should we go for a close? |
@bollwyvl made me aware about a strategy to specify
__version__
in a way that I've not seen us do in any jupyterhub org package through jupyterhub/jupyter-server-proxy#427 (review).Currently:
With @bollwyvl's suggestion:
Is this robust enough to use systematically, reducing the complexity of what
tbump
or any other tooling is required to accomplish? Should we systematically transition towards this pattern?The text was updated successfully, but these errors were encountered: