Skip to content
Prev Previous commit
Next Next commit
Remove references to load_module() from What's New
  • Loading branch information
brettcannon committed Dec 2, 2025
commit e256f38bb6439804946ffa5d3aa7165d21f194f7
4 changes: 2 additions & 2 deletions Doc/whatsnew/3.10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1622,7 +1622,7 @@ Deprecated
compatibility. Specifically,
:meth:`!find_loader`/:meth:`!find_module`
(superseded by :meth:`~importlib.abc.MetaPathFinder.find_spec`),
:meth:`~importlib.abc.Loader.load_module`
``importlib.abc.Loader.load_module``
(superseded by :meth:`~importlib.abc.Loader.exec_module`),
:meth:`!module_repr` (which the import system
takes care of for you), the ``__package__`` attribute
Expand Down Expand Up @@ -1652,7 +1652,7 @@ Deprecated
preference for :meth:`~zipimport.zipimporter.exec_module`.
(Contributed by Brett Cannon in :issue:`26131`.)

* The use of :meth:`~importlib.abc.Loader.load_module` by the import
* The use of ``importlib.abc.Loader.load_module`` by the import
system now triggers an :exc:`ImportWarning` as
:meth:`~importlib.abc.Loader.exec_module` is preferred.
(Contributed by Brett Cannon in :issue:`26131`.)
Expand Down
8 changes: 4 additions & 4 deletions Doc/whatsnew/3.4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2086,10 +2086,10 @@ Deprecations in the Python API
:meth:`!importlib.abc.PathEntryFinder.find_loader` and
:meth:`!find_module` are replaced by
:meth:`importlib.abc.PathEntryFinder.find_spec`; all of the :samp:`{xxx}Loader` ABC
``load_module`` methods (:meth:`!importlib.abc.Loader.load_module`,
:meth:`!importlib.abc.InspectLoader.load_module`,
:meth:`!importlib.abc.FileLoader.load_module`,
:meth:`!importlib.abc.SourceLoader.load_module`) should no longer be
``load_module`` methods (``importlib.abc.Loader.load_module``,
``importlib.abc.InspectLoader.load_module``,
``importlib.abc.FileLoader.load_module``,
``importlib.abc.SourceLoader.load_module``) should no longer be
implemented, instead loaders should implement an
``exec_module`` method
(:meth:`importlib.abc.Loader.exec_module`,
Expand Down
6 changes: 3 additions & 3 deletions Doc/whatsnew/3.6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2006,10 +2006,10 @@ deprecated.
importlib
~~~~~~~~~

The :meth:`importlib.machinery.SourceFileLoader.load_module` and
:meth:`importlib.machinery.SourcelessFileLoader.load_module` methods
The ``importlib.machinery.SourceFileLoader.load_module`` and
``importlib.machinery.SourcelessFileLoader.load_module`` methods
are now deprecated. They were the only remaining implementations of
:meth:`importlib.abc.Loader.load_module` in :mod:`importlib` that had not
``importlib.abc.Loader.load_module`` in :mod:`importlib` that had not
been deprecated in previous versions of Python in favour of
:meth:`importlib.abc.Loader.exec_module`.

Expand Down
Loading