https://github.com/python/cpython/commit/256d6d2131541b3ff8f06f42c8157f808fde464c
commit: 256d6d2131541b3ff8f06f42c8157f808fde464c
branch: main
author: Tomas R. <[email protected]>
committer: brettcannon <[email protected]>
date: 2025-01-15T12:47:36-08:00
summary:
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.
files:
M Doc/library/importlib.rst
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
index 9e088a598a6c08..b935fc0e42a4bd 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)
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]