mirror of
https://github.com/python/cpython.git
synced 2024-11-30 18:51:15 +01:00
GH-109190: Copyedit 3.12 What's New: Update the `imp
` porting guidance (#109755)
This commit is contained in:
parent
09a73d50f6
commit
7b8bfe1644
@ -1411,7 +1411,7 @@ imp
|
||||
* The :mod:`!imp` module has been removed. (Contributed by Barry Warsaw in
|
||||
:gh:`98040`.)
|
||||
|
||||
* Replace removed :mod:`!imp` functions with :mod:`importlib` functions:
|
||||
To migrate, consult the following correspondence table:
|
||||
|
||||
================================= =======================================
|
||||
imp importlib
|
||||
@ -1426,9 +1426,10 @@ imp
|
||||
``imp.new_module(name)`` ``types.ModuleType(name)``
|
||||
``imp.reload()`` :func:`importlib.reload`
|
||||
``imp.source_from_cache()`` :func:`importlib.util.source_from_cache`
|
||||
``imp.load_source()`` *See below*
|
||||
================================= =======================================
|
||||
|
||||
* Replace ``imp.load_source()`` with::
|
||||
Replace ``imp.load_source()`` with::
|
||||
|
||||
import importlib.util
|
||||
import importlib.machinery
|
||||
|
Loading…
Reference in New Issue
Block a user