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
port to packaging to avoid pkg_resources import cost #840
Comments
It's not just that, is there a direct replacement for pre-commit/pre_commit/constants.py Line 21 in c0b1f2f
|
@asottile that part needs a little expansion, personally i'd propose setuptools_scm and writing a version file to the package as importation is so much faster than workingset construction and packageset iteration |
Nothing personal, but I'm not going to use setuptools-scm, it seems a bit over engineered for what equates to writing a text file. There's three parts here that need solving:
The first can reasonably be solved with writing a version number at install time, I really don't want to get The second is a bit trickier, maybe The third is by far the easiest, pre-commit doesn't have any complicated version numbers (yet, and I don't plan on it) and really it can be replaced with |
and hmm, even |
@asottile im the maintainer there that wrote the suggestion, its generally more useful for packages that do not have import time constraints - for example pytest uses the entrypoint system excessively anyway |
its expensive to import pkg_resources if all that's needed is version parsing of packaging
it should be relatively straightforward to simplify and port
The text was updated successfully, but these errors were encountered: