]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-109190: Copyedit 3.12 What's New: Update the ``imp`` porting guidance (#109755)
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>
Mon, 25 Sep 2023 06:24:02 +0000 (07:24 +0100)
committerGitHub <noreply@github.com>
Mon, 25 Sep 2023 06:24:02 +0000 (00:24 -0600)
Doc/whatsnew/3.12.rst

index 33ddd539b3b1f73cf860b0a7168de3c14318a0cf..09d74fbc5c28457bd973303afa7af818aded5dec 100644 (file)
@@ -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