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:
Brett Cannon 2009-03-09 03:35:50 +00:00
parent aa1c8d8899
commit 2a922ed6ad
9 changed files with 739 additions and 171 deletions

View file

@ -65,10 +65,11 @@ class LoaderTests(unittest.TestCase, metaclass=abc.ABCMeta):
Attributes to verify:
* __file__
* __loader__
* __name__
* __file__
* __package__
* __path__
* __loader__
"""
pass