From 04523c5bd60569468cd8971dfaeec99e51c353fa Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 23 Oct 2020 18:10:54 -0700 Subject: Mention in "What's New" that the import system is starting to be cleaned up (GH-22931) Automerge-Triggered-By: GH:brettcannon --- Doc/whatsnew/3.10.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index e464be6..6206c94 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -267,6 +267,23 @@ Optimizations Deprecated ========== +* Starting in this release, there will be a concerted effort to begin + cleaning up old import semantics that were kept for Python 2.7 + compatibility. Specifically, + :meth:`~importlib.abc.PathEntryFinder.find_loader`/:meth:`~importlib.abc.Finder.find_module` + (superseded by :meth:`~importlib.abc.Finder.find_spec`), + :meth:`~importlib.abc.Loader.load_module` + (superseded by :meth:`~importlib.abc.Loader.exec_module`), + :meth:`~importlib.abc.Loader.module_repr` (which the import system + takes care of for you), the ``__package__`` attribute + (superseded by ``__spec__.parent``), the ``__loader__`` attribute + (superseded by ``__spec__.loader``), and the ``__cached__`` attribute + (superseded by ``__spec__.cached``) will slowly be removed (as well + as other classes and methods in :mod:`importlib`). + :exc:`ImportWarning` and/or :exc:`DeprecationWarning` will be raised + as appropriate to help identify code which needs updating during + this transition. + Removed ======= -- cgit v0.12