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

Replace deprecated pkgutil.find_loader with importlib.util.find_spec #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

someone42
Copy link

pkgutil.find_loader was deprecated in Python 3.12. At the moment Python just emits a warning, but in Python 3.14, pkgutil.find_loader will be removed. This PR replaces pkgutil.find_loader with the recommended substitute importlib.util.find_spec.

This will break idfx on installations that have Python <= 3.4. I don't think this will be a problem, given that the latest version of esptool requires Python >= 3.7. But I can imagine there might be migrated installations out there using old versions of Python and esptool, so here's something for the search engines:

If you're getting ModuleNotFoundError: No module named 'importlib.util' or AttributeError: module 'importlib.util' has no attribute 'find_spec' when running idfx, your Windows-side (i.e. not within WSL2) Python installation is too old. Upgrade it to Python >= 3.4.

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

Successfully merging this pull request may close these issues.

1 participant