]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Mention in "What's New" that the import system is starting to be cleaned up (GH-22931)
authorBrett Cannon <brett@python.org>
Sat, 24 Oct 2020 01:10:54 +0000 (18:10 -0700)
committerGitHub <noreply@github.com>
Sat, 24 Oct 2020 01:10:54 +0000 (18:10 -0700)
Automerge-Triggered-By: GH:brettcannon
Doc/whatsnew/3.10.rst

index e464be6eb7e951b5786b06e4e26d8657aba2234d..6206c949cc59bbe3fca5f4cd1795953a78095484 100644 (file)
@@ -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
 =======