diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index b8410e1fc8..2bc6df7ac7 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -80,7 +80,7 @@ def spec_for_distutils(self): class DistutilsLoader(importlib.abc.Loader): def create_module(self, spec): - return importlib.import_module('._distutils', 'setuptools') + return importlib.import_module('setuptools._distutils') def exec_module(self, module): pass diff --git a/changelog.d/2352.misc.rst b/changelog.d/2352.misc.rst new file mode 100644 index 0000000000..79dda996fe --- /dev/null +++ b/changelog.d/2352.misc.rst @@ -0,0 +1 @@ +In distutils hack, use absolute import rather than relative to avoid bpo-30876.