From 09b6994e7c654e9c1185ae614ec233a24b8f57b2 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 26 Aug 2026 15:26:48 +0200 Subject: [PATCH 1/2] Add load_module() removal to 3.15 What's New --- Doc/whatsnew/3.15.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index bf9aceaa20b2b4..6ad20440fcc79f 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -2114,6 +2114,17 @@ http.server (Contributed by Bénédikt Tran in :gh:`133810`.) +importlib +--------- + +* The ``load_module()`` methods of :class:`~importlib.abc.Loader` and its + subclasses is removed. + The import system will no longer call it when defined on custom subclasses. + The method has been deprecated in favor of + :meth:`~importlib.abc.Loader.exec_module()` since Python 3.4. + (Contributed by Brett Cannon in :gh:`97850`.) + + importlib.resources ------------------- From c30cff8b1528bfb3a08fe836924d2b459c90c096 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 26 Aug 2026 15:48:43 +0200 Subject: [PATCH 2/2] Remove unnecessary parentheses --- Doc/whatsnew/3.15.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 6ad20440fcc79f..118d9b3e32b28f 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -2121,7 +2121,7 @@ importlib subclasses is removed. The import system will no longer call it when defined on custom subclasses. The method has been deprecated in favor of - :meth:`~importlib.abc.Loader.exec_module()` since Python 3.4. + :meth:`~importlib.abc.Loader.exec_module` since Python 3.4. (Contributed by Brett Cannon in :gh:`97850`.)