summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2021-03-30 15:43:03 (GMT)
committerGitHub <noreply@github.com>2021-03-30 15:43:03 (GMT)
commita7ff6df60c05e1b69fca743573b1e118bebf121d (patch)
tree7dae896ba674245645b5ca46c02cc387a43d35a0 /Doc/whatsnew
parentcf35e05f89bb008d6f4553f9875e0fe87fc02406 (diff)
downloadcpython-a7ff6df60c05e1b69fca743573b1e118bebf121d.zip
cpython-a7ff6df60c05e1b69fca743573b1e118bebf121d.tar.gz
cpython-a7ff6df60c05e1b69fca743573b1e118bebf121d.tar.bz2
bpo-42134: Raise ImportWarning when calling find_module() in the import system (GH-25044)
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.10.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index 3a563c1..e09cfb4 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -1028,6 +1028,15 @@ Deprecated
:meth:`~importlib.abc.Loader.exec_module` is preferred.
(Contributed by Brett Cannon in :issue:`26131`.)
+* The use of :meth:`importlib.abc.MetaPathFinder.find_module` and
+ :meth:`importlib.abc.PathEntryFinder.find_module` by the import system now
+ trigger an :exc:`ImportWarning` as
+ :meth:`importlib.abc.MetaPathFinder.find_spec` and
+ :meth:`importlib.abc.PathEntryFinder.find_spec`
+ are preferred, respectively. You can use
+ :func:`importlib.util.spec_from_loader` to help in porting.
+ (Contributed by Brett Cannon in :issue:`42134`.)
+
* The import system now uses the ``__spec__`` attribute on modules before
falling back on :meth:`~importlib.abc.Loader.module_repr` for a module's
``__repr__()`` method. Removal of the use of ``module_repr()`` is scheduled