8000 [3.12] gh-97850: Suggest `TraversableResources` as the alternative fo… · python/cpython@0308bcf · GitHub
[go: up one dir, main page]

Skip to content

Commit 0308bcf

Browse files
[3.12] gh-97850: Suggest TraversableResources as the alternative for ResourceLoader (GH-128601) (GH-128896)
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 256d6d2) Co-authored-by: Tomas R <tomas.roun8@gmail.com>
1 parent 85255c4 commit 0308bcf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/library/importlib.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,13 +380,15 @@ ABC hierarchy::
380380

381381
.. class:: ResourceLoader
382382

383+
*Superseded by TraversableResources*
384+
383385
An abstract base class for a :term:`loader` which implements the optional
384386
:pep:`302` protocol for loading arbitrary resources from the storage
385387
back-end.
386388

387389
.. deprecated:: 3.7
388390
This ABC is deprecated in favour of supporting resource loading
389-
through :class:`importlib.resources.abc.ResourceReader`.
391+
through :class:`importlib.resources.abc.TraversableResources`.
390392

391393
.. abstractmethod:: get_data(path)
392394

0 commit comments

Comments
 (0)
0