From: Tomas R. Date: Wed, 15 Jan 2025 20:47:36 +0000 (+0100) Subject: gh-97850: Suggest `TraversableResources` as the alternative for `ResourceLoader`... X-Git-Tag: v3.14.0a5~411 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=256d6d2131541b3ff8f06f42c8157f808fde464c;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index 9e088a598a6c..b935fc0e42a4 100644 --- a/Doc/library/importlib.rst +++ b/Doc/library/importlib.rst @@ -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)