mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[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 256d6d2131)
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
This commit is contained in:
parent
85255c4df2
commit
0308bcfa04
1 changed files with 3 additions and 1 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue