Skip to content
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

python 3.12 removes pkg_resources #249

Open
delfick opened this issue Jan 16, 2024 · 3 comments
Open

python 3.12 removes pkg_resources #249

delfick opened this issue Jan 16, 2024 · 3 comments

Comments

@delfick
Copy link

delfick commented Jan 16, 2024

Hi,

It seems that pylama uses pkg_resources which does not exist after python 3.12

@calebAtIspot
Copy link

I ran into the same issue. https://setuptools.pypa.io/en/latest/pkg_resources.html

Use of pkg_resources is deprecated in favor of importlib.resources, importlib.metadata and their backports (importlib_resources, importlib_metadata). Some useful APIs are also provided by packaging (e.g. requirements and version parsing). Users should refrain from new usage of pkg_resources and should work to port to importlib-based solutions.

Relevant: mu-editor/mu#2485

Looks like you might be able to work around it by installing setuptools, but given that this is deprecated pkg_resources should not be used and this is still a bug.

@bersbersbers
Copy link

The crazy thing is that pylama does not seem to depend on setuptools, so on 3.12, you can end up with a non-working installation of pylama if no other package depends on setuptools, as the bundled one has been removed (python/cpython#95299).

@bje-
Copy link

bje- commented Jun 21, 2024

I've submitted #254 that fixes these issues.

cjwatson added a commit to cjwatson/netmiko that referenced this issue Oct 25, 2024
`setuptools` and `cffi` still appear to be indirect dependencies, but
there's no need to depend on them directly when they aren't used
directly.

`setuptools` still needs to be a development dependency to work around
klen/pylama#249.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants