Skip to content

Commit a3319a3

Browse files
committed
In distutils hack, use absolute import rather than relative to avoid bpo-30876. Fixes #2352.
1 parent db378e2 commit a3319a3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

_distutils_hack/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def spec_for_distutils(self):
8080
class DistutilsLoader(importlib.abc.Loader):
8181

8282
def create_module(self, spec):
83-
return importlib.import_module('._distutils', 'setuptools')
83+
return importlib.import_module('setuptools._distutils')
8484

8585
def exec_module(self, module):
8686
pass

changelog.d/2352.misc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
In distutils hack, use absolute import rather than relative to avoid bpo-30876.

0 commit comments

Comments
 (0)