Skip to content

Commit

Permalink
pythonGH-109190: Copyedit 3.12 What's New: Update the imp porting…
Browse files Browse the repository at this point in the history
… guidance (python#109755)
  • Loading branch information
AA-Turner authored Sep 25, 2023
1 parent 09a73d5 commit 7b8bfe1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 7b8bfe1

Please sign in to comment.