From 7c44700c83b8b281de47b3af2604500ffb434abe Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Fri, 4 Sep 2026 15:21:01 +0200 Subject: [PATCH] gh-97850: Add load_module() removal to 3.15 What's New (GH-156418) (cherry picked from commit 7d71b3eae3cc297af3a55a30fccc85da5adeea7a) Co-authored-by: Petr Viktorin --- 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 96e1bbb128772f8..64f4f38239e2143 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -2106,6 +2106,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 -------------------