From f171aa21db4dcfd7927888f885818d02954fdd84 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 4 Jul 2022 12:46:27 +0300 Subject: [PATCH] gh-93963: Document importlib.abc deprecations --- Doc/library/importlib.resources.abc.rst | 9 +++++++++ Doc/whatsnew/3.12.rst | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/Doc/library/importlib.resources.abc.rst b/Doc/library/importlib.resources.abc.rst index 6b0e1e04c8852a..51d2d958f3d358 100644 --- a/Doc/library/importlib.resources.abc.rst +++ b/Doc/library/importlib.resources.abc.rst @@ -33,6 +33,9 @@ .. versionadded:: 3.7 + .. deprecated-removed:: 3.12 3.14 + Use :class:`importlib.resources.abc.TraversableResources` instead. + .. abstractmethod:: open_resource(resource) Returns an opened, :term:`file-like object` for binary reading @@ -324,6 +327,9 @@ .. versionadded:: 3.9 + .. deprecated-removed:: 3.12 3.14 + Use :class:`importlib.resources.abc.Traversable` instead. + .. attribute:: name Abstract. The base name of this object without any parent references. @@ -379,6 +385,9 @@ .. versionadded:: 3.9 + .. deprecated-removed:: 3.12 3.14 + Use :class:`importlib.resources.abc.TraversableResources` instead. + .. abstractmethod:: files() Returns a :class:`importlib.abc.Traversable` object for the loaded diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index 620aa91f6da227..3ae16591deea64 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -171,6 +171,24 @@ APIs: * :func:`unittest.getTestCaseNames` (:gh:`50096`) * :class:`webbrowser.MacOSX` (:gh:`86421`) +Pending Removal in Python 3.14 +============================== + +* Deprecated the following :mod:`importlib.abc` classes, scheduled for removal in + Python 3.14: + + * :class:`importlib.abc.ResourceReader` + * :class:`importlib.abc.Traversable` + * :class:`importlib.abc.TraversableResources` + + Use :mod:`importlib.resources.abc` classes instead: + + * :class:`importlib.resources.abc.TraversableResources` + * :class:`importlib.resources.abc.Traversable` + * :class:`importlib.resources.abc.TraversableResources` + + (Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.) + Pending Removal in Future Versions ==================================