summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2016-02-21 02:45:56 (GMT)
committerBrett Cannon <brett@python.org>2016-02-21 02:45:56 (GMT)
commit4cbab346dfcea1f221bfb0811fabed8dfb435e7e (patch)
treeaa6d2c6d7acb730c2cf3699b8dee719bb8e32447
parentfe1941ebf87de4fe9761d81b477c67964eea982e (diff)
downloadcpython-4cbab346dfcea1f221bfb0811fabed8dfb435e7e.zip
cpython-4cbab346dfcea1f221bfb0811fabed8dfb435e7e.tar.gz
cpython-4cbab346dfcea1f221bfb0811fabed8dfb435e7e.tar.bz2
Issue #26397: Update an importlib example to use util.module_from_spec() instead of create_module()
-rw-r--r--Doc/library/importlib.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
index 4d429bb..17a65aa 100644
--- a/Doc/library/importlib.rst
+++ b/Doc/library/importlib.rst
@@ -1389,7 +1389,7 @@ Python 3.6 and newer for other parts of the code).
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: