[Python-checkins] Mention in "What's New" that the import system is starting to be cleaned up (GH-22931)

miss-islington webhook-mailer at python.org
Fri Oct 23 21:11:00 EDT 2020


https://github.com/python/cpython/commit/04523c5bd60569468cd8971dfaeec99e51c353fa
commit: 04523c5bd60569468cd8971dfaeec99e51c353fa
branch: master
author: Brett Cannon <brett at python.org>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2020-10-23T18:10:54-07:00
summary:

Mention in "What's New" that the import system is starting to be cleaned up (GH-22931)



Automerge-Triggered-By: GH:brettcannon

files:
M Doc/whatsnew/3.10.rst

diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index e464be6eb7e95..6206c949cc59b 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
 =======



More information about the Python-checkins mailing list