From: Brett Cannon Date: Sun, 21 Feb 2016 02:45:56 +0000 (-0800) Subject: Issue #26397: Update an importlib example to use util.module_from_spec() instead... X-Git-Tag: v3.6.0a1~590 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4cbab346dfcea1f221bfb0811fabed8dfb435e7e;p=python Issue #26397: Update an importlib example to use util.module_from_spec() instead of create_module() --- diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index 4d429bbb56..17a65aab05 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: