]> granicus.if.org Git - python/commitdiff
Issue #26397: Update an importlib example to use util.module_from_spec() instead...
authorBrett Cannon <brett@python.org>
Sun, 21 Feb 2016 02:45:56 +0000 (18:45 -0800)
committerBrett Cannon <brett@python.org>
Sun, 21 Feb 2016 02:45:56 +0000 (18:45 -0800)
Doc/library/importlib.rst

index 4d429bbb568ae871a316555087f4ae856eeb357e..17a65aab05a842af4bd4e5770ee64dcb37b8ce2f 100644 (file)
@@ -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: