-
Notifications
You must be signed in to change notification settings - Fork 22
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
Consider adding a dependency on setuptools #68
Comments
+1 on this. In Python 3.12 neither venv nor virtualenv will install setuptools by default into environments. As a result, this will start to fail pretty soon. |
1 task
For anyone else who's hit this with pre-commit hooks failing, simply add an explicit dependency: - repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- setuptools
- flake8-logging-format |
bdabelow
added a commit
to bdabelow/qtile
that referenced
this issue
May 29, 2024
As of Python 3.12, setuptools is no longer installed into venvs by default: pypa/virtualenv#2487 flake8-logging-format depends on setuptools without explicitely declaring it: globality-corp/flake8-logging-format#68 Add setuptools to additional_dependencies in pre-commit config to avoid issue when running pre-commit hooks with Python 3.12: Flake8 failed to load plugin "flake8-logging-format" due to No module named 'pkg_resources'.
bdabelow
added a commit
to bdabelow/qtile
that referenced
this issue
May 31, 2024
As of Python 3.12, setuptools is no longer installed into venvs by default: pypa/virtualenv#2487 flake8-logging-format depends on setuptools without explicitely declaring it: globality-corp/flake8-logging-format#68 Add setuptools to additional_dependencies in pre-commit config to avoid issue when running pre-commit hooks with Python 3.12: Flake8 failed to load plugin "flake8-logging-format" due to No module named 'pkg_resources'. Also remove workaround from "Run pre-commit" GHA workflow.
tych0
pushed a commit
to qtile/qtile
that referenced
this issue
May 31, 2024
As of Python 3.12, setuptools is no longer installed into venvs by default: pypa/virtualenv#2487 flake8-logging-format depends on setuptools without explicitely declaring it: globality-corp/flake8-logging-format#68 Add setuptools to additional_dependencies in pre-commit config to avoid issue when running pre-commit hooks with Python 3.12: Flake8 failed to load plugin "flake8-logging-format" due to No module named 'pkg_resources'. Also remove workaround from "Run pre-commit" GHA workflow.
There is an open PR #78 that removes the usage of setuptools for python >= 3.10, that would fix this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In
whitelist.py
, there is an import onpkg_resources
fromsetuptools
.flake8-logging-format/logging_format/whitelist.py
Line 5 in b7da42d
This makes the code fail on environments without setuptools.
I suggest avoiding using the package altogether or making it a dependency (eventually optional)
The text was updated successfully, but these errors were encountered: