summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/NOTES
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2009-01-18 00:24:28 (GMT)
committerBrett Cannon <bcannon@gmail.com>2009-01-18 00:24:28 (GMT)
commit23cbd8a6564df0ac3df339f91196c45f3e626d32 (patch)
treebef5602638a1567c28738aa359dae9865e04b6cd /Lib/importlib/NOTES
parent458ad47a2c8045080a86eaaf33bb6cd174021891 (diff)
downloadcpython-23cbd8a6564df0ac3df339f91196c45f3e626d32.zip
cpython-23cbd8a6564df0ac3df339f91196c45f3e626d32.tar.gz
cpython-23cbd8a6564df0ac3df339f91196c45f3e626d32.tar.bz2
Add initial implementation of importlib. See the NOTES files for what is
planned for the package. There are no docs yet, but they are coming once the API for the first new function, importlib.import_module() is finalized.
Diffstat (limited to 'Lib/importlib/NOTES')
-rw-r--r--Lib/importlib/NOTES78
1 files changed, 78 insertions, 0 deletions
diff --git a/Lib/importlib/NOTES b/Lib/importlib/NOTES
new file mode 100644
index 0000000..134f112
--- /dev/null
+++ b/Lib/importlib/NOTES
@@ -0,0 +1,78 @@
+to do
+/////
+
+* Write importlib.__import__
+
+* Document
+ + Package.
+ + import_module
+ + __import__
+
+* Create reasonable base tests that all finders and loaders must pass so
+ that various implementations can just subclass as needed.
+
+* Expose built-in and frozen importers.
+ + Make staticmethods so that class can be used directly.
+
+* Reorganize support code.
+ + Separate general support code and importer-specific (e.g. source) support
+ code.
+ - Create support modules for each subdirectory (as needed).
+ + Add a file loader mock that returns monotonically increasing mtime.
+ - Use in source/test_reload.
+ - Use in source/test_load_module_mixed.
+
+* API simplification?
+ + read_source -> get_data/source_path
+ + read_bytecode -> get_data/bytecode_path
+ + write_bytecode -> complete set of bytes for bytecode instead of
+ individual arguments.
+
+* Implement PEP 302 protocol for loaders (should just be a matter of testing).
+ + Built-in.
+ + Frozen.
+ + Extension.
+ + Source/bytecode.
+
+* Create meta_path importer for sys.path.
+
+* OPTIMIZE!
+ + Write benchmark suite.
+ + Fast path common cases.
+ - Absolute name from sys.path.
+ - Relative name from sys.path.
+
+* Public API (w/ docs!)
+ + abc
+ - Finder
+ * find_module
+ - Loader
+ * load_module
+ - ResourceLoader(Loader)
+ * get_data
+ - InspectLoader(Loader)
+ * is_package
+ * get_code
+ * get_source
+ - (?) SourceLoader(ResourceLoader)
+ * source_path
+ * bytecode_path
+ * write_bytecode
+ + util
+ - get_module decorator (new name)
+ - check_name decorator (new name)
+ + hooks (?)
+ - (?) Chained path hook/finder
+ - BuiltinImporter
+ - FrozenImporter
+ - (?) FileFinder
+ - Extensions importers
+ * ExtensionFinder
+ * (?) Loader
+ - Source/bytecode importers
+ * SourceFinder
+ * (?) Loader
+ + __init__
+ - __import__
+ - import_module (backport to 2.7)
+ - resolve_name (backport to 2.7)