Introduce importlib.abc. The module contains various ABCs related to imports
(mostly stuff specified by PEP 302). There are two ABCs, PyLoader and
PyPycLoader, which help with implementing source and source/bytecode loaders by
implementing load_module in terms of other methods. This removes a lot of
gritty details loaders typically have to worry about.
diff --git a/Lib/importlib/NOTES b/Lib/importlib/NOTES
index 72b7da8..bbbb485 100644
--- a/Lib/importlib/NOTES
+++ b/Lib/importlib/NOTES
@@ -3,42 +3,12 @@
* Public API left to expose (w/ docs!)
- + abc
+ + abc.PyLoader.get_source
+ + util.set_loader
- - Finder
+* Implement InspectLoader for BuiltinImporter and FrozenImporter.
- * find_module
-
- - Loader
-
- * load_module
-
- - ResourceLoader(Loader)
-
- * get_data
-
- - InspectLoader(Loader)
-
- * is_package
- * get_code
- * get_source
-
- - PyLoader(ResourceLoader)
-
- * source_path
-
- - PyPycLoader(PyLoader)
-
- * source_mtime
- * bytecode_path
- * write_bytecode
-
- + test (Really want to worry about compatibility with future versions?)
-
- - abc
-
- * FinderTests [doc]
- * LoaderTests [doc]
+ + Expose function to see if a frozen module is a package.
* Remove ``import *`` from importlib.__init__.
@@ -68,3 +38,4 @@
+ imp
+ py_compile
+ compileall
+ + zipimport