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

3.12 compat #247

Closed
aodj opened this issue Sep 17, 2024 · 1 comment · Fixed by #249
Closed

3.12 compat #247

aodj opened this issue Sep 17, 2024 · 1 comment · Fixed by #249

Comments

@aodj
Copy link

aodj commented Sep 17, 2024

It looks like the pkg_resources library was removed/migrated in Python 3.12 breaking honcho. From mu-editor/mu#2485

From the pkg_resources docs: 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.

Python 3.12 has removed pkg_resources from the standard library (moved to setuptools): docs.python.org/3/whatsnew/3.12.html

gh-95299: Do not pre-install setuptools in virtual environments created with venv. This means that distutils, setuptools, pkg_resources, and easy_install will no longer available by default; to access these run pip install setuptools in the activated virtual environment.

...

Good news is that the importlib_resources backport library contains documentation on how to migrate: importlib-resources.readthedocs.io/en/latest/migration.html#pkg-resources-resource-filename

@confuzeus
Copy link

It looks like entry_points from importlib.metadata should be used instead of iter_entry_points from pkg_resources.

nickstenning added a commit that referenced this issue Oct 6, 2024
pkg_resources requires setuptools and importlib has been available since
Python 3.8.

Affects #236, #247, #248.
nickstenning added a commit that referenced this issue Oct 6, 2024
pkg_resources requires setuptools and importlib has been available since
Python 3.8.

Affects #236, #247, #248.
nickstenning added a commit that referenced this issue Oct 6, 2024
pkg_resources requires setuptools and importlib has been available since
Python 3.8.

Affects #236, #247, #248.
nickstenning added a commit that referenced this issue Oct 6, 2024
pkg_resources requires setuptools and importlib has been available since
Python 3.8.

Affects #236, #247, #248.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants