Skip to content

Commit

Permalink
Merge pull request #2361 from vstinner/master
Browse files Browse the repository at this point in the history
Add Python 3.10 support to _distutils_hack
  • Loading branch information
jaraco committed Sep 1, 2020
2 parents 80de55d + df8c341 commit 48e250a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion _distutils_hack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ def find_spec(self, fullname, path, target=None):
return method()

def spec_for_distutils(self):
import importlib.abc
import importlib.util

class DistutilsLoader(importlib.util.abc.Loader):
class DistutilsLoader(importlib.abc.Loader):

def create_module(self, spec):
return importlib.import_module('._distutils', 'setuptools')
Expand Down
3 changes: 3 additions & 0 deletions changelog.d/2361.change.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Add Python 3.10 support to _distutils_hack. Get the 'Loader' abstract class
from importlib.abc rather than importlib.util.abc (alias removed in Python
3.10).

0 comments on commit 48e250a

Please sign in to comment.