summaryrefslogtreecommitdiffstats
path: root/Lib/imp.py
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2015-09-06 03:53:04 (GMT)
committerLarry Hastings <larry@hastings.org>2015-09-06 03:53:04 (GMT)
commit055a9e0bc8eb28fd64158ade11019b712116aeae (patch)
tree00f75387fa11dfc0678884f5d2f15e24ad6b525c /Lib/imp.py
parent699534210c935de3d5041c801bd97270fd31a522 (diff)
parent9d3c61c86a20678d604c96a68bbf4a966877f0b9 (diff)
downloadcpython-055a9e0bc8eb28fd64158ade11019b712116aeae.zip
cpython-055a9e0bc8eb28fd64158ade11019b712116aeae.tar.gz
cpython-055a9e0bc8eb28fd64158ade11019b712116aeae.tar.bz2
Merged in ncoghlan/cpython350 (pull request #17)
Diffstat (limited to 'Lib/imp.py')
-rw-r--r--Lib/imp.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/imp.py b/Lib/imp.py
index 2cd6440..f6fff44 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