Kaydet (Commit) 8d18907a authored tarafından Brett Cannon's avatar Brett Cannon

While not strictly necessary thanks to the odd ABC inheritance done through

importlib._bootstrap, add the optional methods for importlib.abc.SourceLoader
for completeness.
üst 2525dc8f
......@@ -117,6 +117,20 @@ class SourceLoader(_bootstrap.SourceLoader, ResourceLoader, ExecutionLoader):
"""
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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment