[Python-checkins] cpython: Issue #26397: Update an importlib example to use util.module_from_spec()
brett.cannon
python-checkins at python.org
Sat Feb 20 21:46:01 EST 2016
https://hg.python.org/cpython/rev/f2a089d68297
changeset: 100283:f2a089d68297
user: Brett Cannon <brett at python.org>
date: Sat Feb 20 18:45:56 2016 -0800
summary:
Issue #26397: Update an importlib example to use util.module_from_spec() instead of create_module()
files:
Doc/library/importlib.rst | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
--- a/Doc/library/importlib.rst
+++ b/Doc/library/importlib.rst
@@ -1389,7 +1389,7 @@
break
else:
raise ImportError(f'No module named {absolute_name!r}')
- module = spec.loader.create_module(spec)
+ module = util.module_from_spec(spec)
spec.loader.exec_module(module)
sys.modules[absolute_name] = module
if path is not None:
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list