[Python-checkins] r84267 - python/branches/py3k/Lib/importlib/abc.py

brett.cannon python-checkins at python.org
Sun Aug 22 22:38:48 CEST 2010


Author: brett.cannon
Date: Sun Aug 22 22:38:47 2010
New Revision: 84267

Log:
While not strictly necessary thanks to the odd ABC inheritance done through
importlib._bootstrap, add the optional methods for importlib.abc.SourceLoader
for completeness.


Modified:
   python/branches/py3k/Lib/importlib/abc.py

Modified: python/branches/py3k/Lib/importlib/abc.py
==============================================================================
--- python/branches/py3k/Lib/importlib/abc.py	(original)
+++ python/branches/py3k/Lib/importlib/abc.py	Sun Aug 22 22:38:47 2010
@@ -117,6 +117,20 @@
 
     """
 
+    def path_mtime(self, path:str) -> int:
+        """Return the modification time for the path."""
+        raise NotImplementedError
+
+    def set_data(self, path:str, data:bytes) -> None:
+        """Write the bytes to the path (if possible).
+
+        Any needed intermediary directories are to be created. If for some
+        reason the file cannot be written because of permissions, fail
+        silently.
+
+        """
+        raise NotImplementedError
+
 
 class PyLoader(SourceLoader):
 


More information about the Python-checkins mailing list