8000 [3.12] GH-109190: Copyedit 3.12 What's New: Update the ``imp`` porting guidance (GH-109755) by miss-islington · Pull Request #109816 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.12] GH-109190: Copyedit 3.12 What's New: Update the imp porting guidance (GH-109755) #109816

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
GH-109190: Copyedit 3.12 What's New: Update the imp porting guida…
…nce (GH-109755)

(cherry picked from commit 7b8bfe1)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
  • Loading branch information
AA-Turner authored and miss-islington committed Sep 25, 2023
commit f1b4d30e9b6b0bbba4d40303f4dbde447a72da17
5 changes: 3 additions & 2 deletions Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,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 @@ -1418,9 +1418,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