mirror of
https://github.com/python/cpython.git
synced 2025-10-27 08:46:53 +00:00
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.
This commit is contained in:
parent
aa1c8d8899
commit
2a922ed6ad
9 changed files with 739 additions and 171 deletions
|
|
@ -3,42 +3,12 @@ to do
|
|||
|
||||
* 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 @@ in the language specification).
|
|||
+ imp
|
||||
+ py_compile
|
||||
+ compileall
|
||||
+ zipimport
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue