-
-
Notifications
You must be signed in to change notification settings - Fork 370
Closed
Description
importlib.util is used in get_source_meta() method here:
hatch/backend/src/hatchling/version/source/code.py
Lines 47 to 48 in d167faa
| spec = importlib.util.spec_from_file_location(os.path.splitext(path)[0], path) # type: ignore | |
| module = importlib.util.module_from_spec(spec) # type: ignore |
but instead of importing importlib.util just importlib is imported:
hatch/backend/src/hatchling/version/source/code.py
Lines 11 to 12 in d167faa
| def get_version_data(self) -> dict: | |
| import importlib |
This often works if some other package has already imported importlib.utils, but there is no guarantee that it will work, and it does not work on a clean Python 3.11 installation. See this discussion: https://discuss.python.org/t/python3-11-importlib-no-longer-exposes-util/25641
JupyterLab Ci got hit by this recently in: jupyterlab/jupyterlab#15692
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels