blob: 028f78948c40bcc0156c49384879057c9ff76808 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
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
* 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 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)
+ machinery
- (?) Chained path hook/finder
- BuiltinImporter
- FrozenImporter
- (?) FileFinder
- Extensions importers
* ExtensionFinder
* (?) Loader
- Source/bytecode importers
* SourceFinder
* (?) Loader
* Bootstrap importlib as implementation of builtins.__import__
|