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).
This commit is contained in:
Brett Cannon 2009-01-22 22:43:07 +00:00
parent 7b3c89d88c
commit 5abdc93eb8
7 changed files with 68 additions and 75 deletions

View file

@ -1,4 +1,4 @@
import importlib
from importlib import machinery
from .. import support
import sys
@ -12,7 +12,7 @@ class FinderTests(unittest.TestCase):
name = 'errno'
find_module = staticmethod(lambda name, path=None:
importlib.BuiltinImporter().find_module(name, path))
machinery.BuiltinImporter.find_module(name, path))
def test_find_module(self):