diff options
author | Steve Dower <steve.dower@microsoft.com> | 2015-09-06 22:27:42 -0700 |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2015-09-06 22:27:42 -0700 |
commit | f35bd306ffa2c05a1297435bb15cd3b4d47b3977 (patch) | |
tree | 8a909b9eb6a5325a5ebbcbdc5858dd798d78db0d /Lib/imp.py | |
parent | da19767b86dcee5810ad8c77a05811be041d7c89 (diff) | |
parent | c1635e497d060bae076127152801af2b2ec552ff (diff) | |
download | cpython-git-f35bd306ffa2c05a1297435bb15cd3b4d47b3977.tar.gz |
Merge from 3.5.0 branch.
Diffstat (limited to 'Lib/imp.py')
-rw-r--r-- | Lib/imp.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/imp.py b/Lib/imp.py index 2cd64407e8..f6fff44201 100644 --- a/Lib/imp.py +++ b/Lib/imp.py @@ -334,6 +334,12 @@ if create_dynamic: """ import importlib.machinery loader = importlib.machinery.ExtensionFileLoader(name, path) - return loader.load_module() + + # Issue #24748: Skip the sys.modules check in _load_module_shim; + # always load new extension + spec = importlib.machinery.ModuleSpec( + name=name, loader=loader, origin=path) + return _load(spec) + else: load_dynamic = None |