blob: b88d5e3bb685f125d9528d13ca47c718883fcf09 [file] [log] [blame]
Brett Cannon23cbd8a2009-01-18 00:24:28 +00001to do
2/////
3
Brett Cannonc1761b72009-02-09 21:51:29 +00004* Refactor source/bytecode finder/loader code such that bytecode support is a
5 subclass of source support (makes it nicer for VMs that don't use CPython
6 bytecode).
7
Brett Cannon33dbf462009-02-17 07:15:17 +00008 + chained_path_hook
9 + FileFinder
10
11 - find_module
12
13 + ExtensionFileFinder
14 + PyFileFinder
15 + PyPycFileFinder
16 + PyFileLoader
17
18 - get_code for source only
19 - get_data
20 - source_mtime
21 - source_path
22
23 + PyPycFileLoader(PyFileLoader)
24
25 - get_code
26 - bytecode_path
27 - write_bytecode
28
Brett Cannond0005ff2009-01-26 01:54:40 +000029* Implement PEP 302 protocol for loaders (should just be a matter of testing).
30
Brett Cannond0005ff2009-01-26 01:54:40 +000031 + Source/bytecode.
32
Brett Cannon6411aa52009-02-06 00:07:49 +000033* Public API left to expose (w/ docs!)
Brett Cannon5abdc932009-01-22 22:43:07 +000034
Brett Cannond2e7b332009-02-17 02:45:03 +000035 + abc
Brett Cannon5abdc932009-01-22 22:43:07 +000036
Brett Cannond2e7b332009-02-17 02:45:03 +000037 - Finder
Brett Cannon5abdc932009-01-22 22:43:07 +000038
Brett Cannond2e7b332009-02-17 02:45:03 +000039 * find_module
Brett Cannon5abdc932009-01-22 22:43:07 +000040
Brett Cannond2e7b332009-02-17 02:45:03 +000041 - Loader
Brett Cannon5abdc932009-01-22 22:43:07 +000042
Brett Cannond2e7b332009-02-17 02:45:03 +000043 * load_module
Brett Cannon5abdc932009-01-22 22:43:07 +000044
Brett Cannond2e7b332009-02-17 02:45:03 +000045 - (?) Importer(Finder, Loader)
46 - ResourceLoader(Loader)
Brett Cannon6411aa52009-02-06 00:07:49 +000047
Brett Cannond2e7b332009-02-17 02:45:03 +000048 * get_data
Brett Cannon5abdc932009-01-22 22:43:07 +000049
Brett Cannond2e7b332009-02-17 02:45:03 +000050 - InspectLoader(Loader)
Brett Cannon5abdc932009-01-22 22:43:07 +000051
Brett Cannond2e7b332009-02-17 02:45:03 +000052 * is_package
53 * get_code
54 * get_source
Brett Cannon5abdc932009-01-22 22:43:07 +000055
Brett Cannond2e7b332009-02-17 02:45:03 +000056 - (?) SourceLoader(ResourceLoader)
Brett Cannon5abdc932009-01-22 22:43:07 +000057
Brett Cannond2e7b332009-02-17 02:45:03 +000058 * source_path
59 * bytecode_path
60 * write_bytecode (not abstract)
Brett Cannon5abdc932009-01-22 22:43:07 +000061
Brett Cannond2e7b332009-02-17 02:45:03 +000062 + util
Brett Cannon5abdc932009-01-22 22:43:07 +000063
Brett Cannond2e7b332009-02-17 02:45:03 +000064 - set___package__ decorator
Brett Cannon5abdc932009-01-22 22:43:07 +000065
Brett Cannond2e7b332009-02-17 02:45:03 +000066 + machinery
Brett Cannon5abdc932009-01-22 22:43:07 +000067
Brett Cannond2e7b332009-02-17 02:45:03 +000068 - Extensions importers
Brett Cannon5abdc932009-01-22 22:43:07 +000069
Brett Cannond2e7b332009-02-17 02:45:03 +000070 * ExtensionFinder
71 * (?) Loader
Brett Cannon5abdc932009-01-22 22:43:07 +000072
Brett Cannond2e7b332009-02-17 02:45:03 +000073 - Source/bytecode importers
Brett Cannon5abdc932009-01-22 22:43:07 +000074
Brett Cannond2e7b332009-02-17 02:45:03 +000075 * SourceFinder
76 * (?) Loader
Brett Cannon5abdc932009-01-22 22:43:07 +000077
Brett Cannon22db67e2009-02-21 02:51:12 +000078 + test (Really want to worry about compatibility with future versions?)
Brett Cannon24b6a2c2009-01-18 00:36:55 +000079
Brett Cannond2e7b332009-02-17 02:45:03 +000080 - abc
81
82 * FinderTests [doc]
83 * LoaderTests [doc]
Brett Cannon2c318a12009-02-07 01:15:27 +000084
Brett Cannondebb98d2009-02-16 04:18:01 +000085* Make sure that there is documentation *somewhere* fully explaining the
86semantics of import that can be referenced from the package's documentation
87(even if it is in the package documentation itself, although it might be best
88in the language specification).
89
Brett Cannon20b56e12009-02-01 05:55:23 +000090* Write benchmark suite.
91
92* OPTIMIZE!
93
Brett Cannon6411aa52009-02-06 00:07:49 +000094 + Fast path absolute name.
95 + Fast path pulling from sys.modules.
Brett Cannon20b56e12009-02-01 05:55:23 +000096
Brett Cannon24b6a2c2009-01-18 00:36:55 +000097* Bootstrap importlib as implementation of builtins.__import__
Brett Cannon438cecd2009-02-02 20:32:29 +000098
99* Replace standard library modules.
100
101 + imp
102 + py_compile
103 + compileall