mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Issue #20383: Introduce importlib.util.module_from_spec().
Along the way, dismantle importlib._bootstrap._SpecMethods as it was no longer relevant and constructing the new function required partially dismantling the class anyway.
This commit is contained in:
parent
c8f0d6ebfc
commit
2a17bde930
17 changed files with 4536 additions and 4736 deletions
2
setup.py
2
setup.py
|
@ -342,7 +342,7 @@ class PyBuildExt(build_ext):
|
|||
spec = importlib.util.spec_from_file_location(ext.name, ext_filename,
|
||||
loader=loader)
|
||||
try:
|
||||
importlib._bootstrap._SpecMethods(spec).load()
|
||||
importlib._bootstrap._load(spec)
|
||||
except ImportError as why:
|
||||
self.failed_on_import.append(ext.name)
|
||||
self.announce('*** WARNING: renaming "%s" since importing it'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue