From 4cbab346dfcea1f221bfb0811fabed8dfb435e7e Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sat, 20 Feb 2016 18:45:56 -0800 Subject: Issue #26397: Update an importlib example to use util.module_from_spec() instead of create_module() --- Doc/library/importlib.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit v0.12