From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 15 Jan 2025 20:53:17 +0000 (+0100) Subject: [3.13] gh-97850: Suggest `TraversableResources` as the alternative for `ResourceLoade... X-Git-Tag: v3.13.2~99 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=714b85136bf5974786e66730e5006b79ba6d6728;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-97850: Suggest `TraversableResources` as the alternative for `ResourceLoader` (GH-128601) (GH-128895) 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 256d6d2131541b3ff8f06f42c8157f808fde464c) Co-authored-by: Tomas R --- diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index de41104216d4..03bd8b144d4c 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)