aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/imp.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/imp.py')
-rw-r--r--Lib/imp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/imp.py b/Lib/imp.py
index fc42c157658..fe850f6a001 100644
--- a/Lib/imp.py
+++ b/Lib/imp.py
@@ -338,8 +338,8 @@ if create_dynamic:
# 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)
+ spec = importlib.util.spec_from_file_location(
+ name, path, loader=loader)
return _load(spec)
else: