summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/importlib')
-rw-r--r--Lib/importlib/abc.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/importlib/abc.py b/Lib/importlib/abc.py
index b772db3..bbff7af 100644
--- a/Lib/importlib/abc.py
+++ b/Lib/importlib/abc.py
@@ -342,9 +342,14 @@ class SourceLoader(_bootstrap_external.SourceLoader, ResourceLoader, ExecutionLo
_register(SourceLoader, machinery.SourceFileLoader)
-class ResourceReader(Loader):
+class ResourceReader:
- """Abstract base class for loaders to provide resource reading support."""
+ """Abstract base class to provide resource-reading support.
+
+ Loaders that support resource reading are expected to implement
+ the ``get_resource_reader(fullname)`` method and have it either return None
+ or an object compatible with this ABC.
+ """
@abc.abstractmethod
def open_resource(self, resource):