diff --git a/changelogs/fragments/pep517-backend-import-fix.yml b/changelogs/fragments/pep517-backend-import-fix.yml new file mode 100644 index 00000000000..e7e2b1d4823 --- /dev/null +++ b/changelogs/fragments/pep517-backend-import-fix.yml @@ -0,0 +1,2 @@ +bugfixes: + - pep517 build backend - Use the documented ``import_module`` import from ``importlib``. diff --git a/packaging/pep517_backend/_backend.py b/packaging/pep517_backend/_backend.py index d4d10f2364c..e9bb8097c96 100644 --- a/packaging/pep517_backend/_backend.py +++ b/packaging/pep517_backend/_backend.py @@ -9,7 +9,7 @@ import sys import typing as t from configparser import ConfigParser from contextlib import contextmanager, suppress -from importlib.metadata import import_module +from importlib import import_module from io import StringIO from pathlib import Path from shutil import copytree