Skip to content

Commit 04523c5

Browse files
authored
Mention in "What's New" that the import system is starting to be cleaned up (GH-22931)
Automerge-Triggered-By: GH:brettcannon
1 parent 976da90 commit 04523c5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Doc/whatsnew/3.10.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,23 @@ Optimizations
267267
Deprecated
268268
==========
269269

270+
* Starting in this release, there will be a concerted effort to begin
271+
cleaning up old import semantics that were kept for Python 2.7
272+
compatibility. Specifically,
273+
:meth:`~importlib.abc.PathEntryFinder.find_loader`/:meth:`~importlib.abc.Finder.find_module`
274+
(superseded by :meth:`~importlib.abc.Finder.find_spec`),
275+
:meth:`~importlib.abc.Loader.load_module`
276+
(superseded by :meth:`~importlib.abc.Loader.exec_module`),
277+
:meth:`~importlib.abc.Loader.module_repr` (which the import system
278+
takes care of for you), the ``__package__`` attribute
279+
(superseded by ``__spec__.parent``), the ``__loader__`` attribute
280+
(superseded by ``__spec__.loader``), and the ``__cached__`` attribute
281+
(superseded by ``__spec__.cached``) will slowly be removed (as well
282+
as other classes and methods in :mod:`importlib`).
283+
:exc:`ImportWarning` and/or :exc:`DeprecationWarning` will be raised
284+
as appropriate to help identify code which needs updating during
285+
this transition.
286+
270287

271288
Removed
272289
=======

0 commit comments

Comments
 (0)