mirror of
https://github.com/python/cpython.git
synced 2025-11-19 02:39:15 +00:00
Issue #26397: Update an importlib example to use util.module_from_spec() instead of create_module()
This commit is contained in:
parent
fe1941ebf8
commit
4cbab346df
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue