]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-97850: Suggest `TraversableResources` as the alternative for `ResourceLoader`...
authorTomas R. <tomas.roun8@gmail.com>
Wed, 15 Jan 2025 20:47:36 +0000 (21:47 +0100)
committerGitHub <noreply@github.com>
Wed, 15 Jan 2025 20:47:36 +0000 (12:47 -0800)
Suggest TraversableResources as the alternative for ResourceLoader.

Previously, ResourceReader was the suggested alternative, but it
is itself deprecated in favour of TraversableResources.

Doc/library/importlib.rst

index 9e088a598a6c086168989f40dca70181143c1664..b935fc0e42a4bd4c9b155c9cb56293a85b470f7e 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)