Skip to content

Commit

Permalink
pythongh-97850: Suggest TraversableResources as the alternative for…
Browse files Browse the repository at this point in the history
… `ResourceLoader` (pythonGH-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>
  • Loading branch information
tomasr8 authored and miss-islington committed Jan 15, 2025
1 parent 85255c4 commit d095616
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Doc/library/importlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit d095616

Please sign in to comment.