diff options
| author | Brett Cannon <brett@python.org> | 2014-05-30 18:55:29 (GMT) |
|---|---|---|
| committer | Brett Cannon <brett@python.org> | 2014-05-30 18:55:29 (GMT) |
| commit | 2a17bde930af72995a217f6625d763e828bf5ce1 (patch) | |
| tree | e36ddef450d49c50b324d5e2741161f9ea22188c /Lib/importlib/__init__.py | |
| parent | c8f0d6ebfc8e114d72c9e642ed33ebb93276427d (diff) | |
| download | cpython-2a17bde930af72995a217f6625d763e828bf5ce1.zip cpython-2a17bde930af72995a217f6625d763e828bf5ce1.tar.gz cpython-2a17bde930af72995a217f6625d763e828bf5ce1.tar.bz2 | |
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.
Diffstat (limited to 'Lib/importlib/__init__.py')
| -rw-r--r-- | Lib/importlib/__init__.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/importlib/__init__.py b/Lib/importlib/__init__.py index 1bc9947..e0fe466 100644 --- a/Lib/importlib/__init__.py +++ b/Lib/importlib/__init__.py @@ -145,8 +145,7 @@ def reload(module): pkgpath = None target = module spec = module.__spec__ = _bootstrap._find_spec(name, pkgpath, target) - methods = _bootstrap._SpecMethods(spec) - methods.exec(module) + _bootstrap._exec(spec, module) # The module may have replaced itself in sys.modules! return sys.modules[name] finally: |
