diff options
author | Brett Cannon <bcannon@gmail.com> | 2009-01-22 22:43:07 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2009-01-22 22:43:07 (GMT) |
commit | 5abdc93eb85bc434c3b81b6c7fd1f05e7c9b5fb8 (patch) | |
tree | 17dbd10a78d4efc28ab798d9cdb3146419223c28 /Lib/importlib/NOTES | |
parent | 7b3c89d88cac53325b30f583643d288426d90789 (diff) | |
download | cpython-5abdc93eb85bc434c3b81b6c7fd1f05e7c9b5fb8.zip cpython-5abdc93eb85bc434c3b81b6c7fd1f05e7c9b5fb8.tar.gz cpython-5abdc93eb85bc434c3b81b6c7fd1f05e7c9b5fb8.tar.bz2 |
Add importlib.machinery with its first tenants, BuitinImporter and
FrozenImporter. Docs forthcoming.
I plan on all finders and loaders (and most likely hooks) to live
in imoprtlib.machinery. Utility stuff will end up in importlib.util.
Higher-level API stuff will stay on imoprtlib directly (e.g. import_module).
Diffstat (limited to 'Lib/importlib/NOTES')
-rw-r--r-- | Lib/importlib/NOTES | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/Lib/importlib/NOTES b/Lib/importlib/NOTES index e0ca28c..028f789 100644 --- a/Lib/importlib/NOTES +++ b/Lib/importlib/NOTES @@ -1,9 +1,16 @@ to do ///// +* Document: + + + The terms "importer", "finder", and "loader". + + machinery.BuiltinImporter. + + machinery.FrozenImporter. + * Expose resolve_name(). * Backport to Python 2.7. + + import_module + resolve_name @@ -11,9 +18,11 @@ to do 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). @@ -22,12 +31,14 @@ to do - 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. @@ -36,39 +47,59 @@ to do * 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 to expose (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 (?) + + + machinery + - (?) Chained path hook/finder - BuiltinImporter - FrozenImporter - (?) FileFinder - Extensions importers + * ExtensionFinder * (?) Loader + - Source/bytecode importers + * SourceFinder * (?) Loader |