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.
This commit is contained in:
Tomas R. 2025-01-15 21:47:36 +01:00 committed by GitHub
parent 36c5e3bcc2
commit 256d6d2131
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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)