We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
On Python 3.12, one cannot assume setuptools is available. python/cpython#95299
$ python3.12 -m venv .venv $ source .venv/bin/activate (.venv) $ pip install --upgrade pip ... (.venv) $ pip list Package Version ------- ------- pip 24.0 (.venv) $ pip install prospector ... (.venv) $ prospector Traceback (most recent call last): File "/home/curtis/src/pre-commit/.venv/bin/prospector", line 5, in <module> from prospector.run import main File "/home/curtis/src/pre-commit/.venv/lib64/python3.12/site-packages/prospector/run.py", line 9, in <module> from prospector import blender, postfilter, tools File "/home/curtis/src/pre-commit/.venv/lib64/python3.12/site-packages/prospector/blender.py", line 9, in <module> import pkg_resources ModuleNotFoundError: No module named 'pkg_resources'
Workaround:
(.venv) $ pip install setuptools ... (.venv) $ prospector Messages ======== foo.py Line: 1 pylint: disallowed-name / Disallowed name "foo" Check Information ================= Started: 2024-02-25 15:00:20.065460 Finished: 2024-02-25 15:00:20.162956 Time Taken: 0.10 seconds Formatter: grouped Profiles: default, no_doc_warnings, no_test_warnings, strictness_medium, strictness_high, strictness_veryhigh, no_member_warnings Strictness: None Libraries Used: Tools Run: dodgy, mccabe, profile-validator, pycodestyle, pyflakes, pylint Messages Found: 1
The text was updated successfully, but these errors were encountered:
Easy workaround, add setuptools to additional_dependencies
- repo: https://github.com/landscapeio/prospector rev: v1.10.3 hooks: - id: prospector additional_dependencies: ["setuptools"]
Sorry, something went wrong.
Shouldn't we use import lib? https://docs.python.org/3/library/importlib.html
Yes that probably makes more sense now. pkg_resources is probably just a hangover from when prospector was written in python2
pkg_resources
sbrunner
Successfully merging a pull request may close this issue.
On Python 3.12, one cannot assume setuptools is available. python/cpython#95299
Workaround:
The text was updated successfully, but these errors were encountered: