[Python-checkins] GH-97850: Suppress cross-references to removed ``importlib.util`` functions (#104134)

AlexWaygood webhook-mailer at python.org
Wed May 3 09:13:19 EDT 2023


https://github.com/python/cpython/commit/423d7faeb37b6c13b3ebbf9255165fefc651983e
commit: 423d7faeb37b6c13b3ebbf9255165fefc651983e
branch: main
author: Adam Turner <9087854+AA-Turner at users.noreply.github.com>
committer: AlexWaygood <Alex.Waygood at Gmail.com>
date: 2023-05-03T14:13:03+01:00
summary:

GH-97850: Suppress cross-references to removed ``importlib.util`` functions (#104134)

`importlib.utils` -> `importlib.util` in a few places

---------

Co-authored-by: Alex Waygood <Alex.Waygood at Gmail.com>

files:
M Doc/whatsnew/3.10.rst
M Doc/whatsnew/3.11.rst
M Doc/whatsnew/3.4.rst
M Misc/NEWS.d/3.10.0a5.rst
M Misc/NEWS.d/3.12.0a1.rst

diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index f689930ff0ca..661eeaedbfc0 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -1683,9 +1683,9 @@ Deprecated
   (Contributed by Brett Cannon in :issue:`42135`.)
 
 * The deprecations of :mod:`!imp`, :func:`!importlib.find_loader`,
-  :func:`importlib.util.set_package_wrapper`,
-  :func:`importlib.util.set_loader_wrapper`,
-  :func:`importlib.util.module_for_loader`,
+  :func:`!importlib.util.set_package_wrapper`,
+  :func:`!importlib.util.set_loader_wrapper`,
+  :func:`!importlib.util.module_for_loader`,
   :class:`!pkgutil.ImpImporter`, and
   :class:`!pkgutil.ImpLoader` have all been updated to list Python 3.12 as the
   slated version of removal (they began raising :exc:`DeprecationWarning` in
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 7d3639f67952..7a479c6e56a9 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -1889,7 +1889,7 @@ C APIs pending removal are
 * :meth:`!importlib.machinery.FrozenLoader.module_repr`
 * :meth:`!importlib.machinery.PathFinder.find_module`
 * :meth:`!importlib.machinery.WindowsRegistryFinder.find_module`
-* :func:`importlib.util.module_for_loader`
+* :func:`!importlib.util.module_for_loader`
 * :func:`!importlib.util.set_loader_wrapper`
 * :func:`!importlib.util.set_package_wrapper`
 * :class:`!pkgutil.ImpImporter`
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
index 38f9449b9afe..45bb91833a35 100644
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -2097,8 +2097,8 @@ Deprecations in the Python API
   :meth:`importlib.abc.SourceLoader.exec_module`) and let the import system
   take care of the rest; and
   :meth:`!importlib.abc.Loader.module_repr`,
-  :meth:`importlib.util.module_for_loader`, :meth:`importlib.util.set_loader`,
-  and :meth:`importlib.util.set_package` are no longer needed because their
+  :meth:`!importlib.util.module_for_loader`, :meth:`!importlib.util.set_loader`,
+  and :meth:`!importlib.util.set_package` are no longer needed because their
   functions are now handled automatically by the import system.
 
 * The :mod:`!imp` module is pending deprecation. To keep compatibility with
@@ -2277,7 +2277,7 @@ Changes in the Python API
   in a backwards-compatible fashion, use e.g.
   ``getattr(module, '__loader__', None) is not None``.  (:issue:`17115`.)
 
-* :meth:`importlib.util.module_for_loader` now sets ``__loader__`` and
+* :meth:`!importlib.util.module_for_loader` now sets ``__loader__`` and
   ``__package__`` unconditionally to properly support reloading. If this is not
   desired then you will need to set these attributes manually. You can use
   :func:`importlib.util.module_to_load` for module management.
diff --git a/Misc/NEWS.d/3.10.0a5.rst b/Misc/NEWS.d/3.10.0a5.rst
index 1c7c7447cae0..497e38491718 100644
--- a/Misc/NEWS.d/3.10.0a5.rst
+++ b/Misc/NEWS.d/3.10.0a5.rst
@@ -499,7 +499,7 @@ Araujo.
 .. nonce: HY2beA
 .. section: Documentation
 
-Updated importlib.utils.resolve_name() doc to use __spec__.parent instead of
+Updated importlib.util.resolve_name() doc to use __spec__.parent instead of
 __package__. (Thanks Yair Frid.)
 
 ..
diff --git a/Misc/NEWS.d/3.12.0a1.rst b/Misc/NEWS.d/3.12.0a1.rst
index 075e8da825a3..ff5064f89d8d 100644
--- a/Misc/NEWS.d/3.12.0a1.rst
+++ b/Misc/NEWS.d/3.12.0a1.rst
@@ -2028,8 +2028,8 @@ resources.
 .. nonce: NzdREm
 .. section: Library
 
-Remove deprecated :func:`importlib.utils.set_loader` and
-:func:`importlib.utils.module_for_loader` from :mod:`importlib.utils`.
+Remove deprecated :func:`!importlib.util.set_loader` and
+:func:`!importlib.util.module_for_loader` from :mod:`importlib.util`.
 
 ..
 



More information about the Python-checkins mailing list