]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-97850: Suggest `TraversableResources` as the alternative for `ResourceLoade...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 15 Jan 2025 20:55:06 +0000 (21:55 +0100)
committerGitHub <noreply@github.com>
Wed, 15 Jan 2025 20:55:06 +0000 (20:55 +0000)
gh-97850: Suggest `TraversableResources` as the alternative for `ResourceLoader` (GH-128601)

Suggest TraversableResources as the alternative for ResourceLoader.

Previously, ResourceReader was the suggested alternative, but it
is itself deprecated in favour of TraversableResources.
(cherry picked from commit 256d6d2131541b3ff8f06f42c8157f808fde464c)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Doc/library/importlib.rst

index e4e09b096f7c048aac2dd10ddcb307cfd4b71c75..0fe58549bdac3fe9d039ef5c9b6fec84929ee5bd 100644 (file)
@@ -380,13 +380,15 @@ ABC hierarchy::
 
 .. class:: ResourceLoader
 
+   *Superseded by TraversableResources*
+
     An abstract base class for a :term:`loader` which implements the optional
     :pep:`302` protocol for loading arbitrary resources from the storage
     back-end.
 
     .. deprecated:: 3.7
        This ABC is deprecated in favour of supporting resource loading
-       through :class:`importlib.resources.abc.ResourceReader`.
+       through :class:`importlib.resources.abc.TraversableResources`.
 
     .. abstractmethod:: get_data(path)