mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
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:
parent
7b3c89d88c
commit
5abdc93eb8
7 changed files with 68 additions and 75 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import importlib
|
||||
from importlib import machinery
|
||||
from ..builtin import test_finder
|
||||
from .. import support
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ class FinderTests(test_finder.FinderTests):
|
|||
"""Test finding frozen modules."""
|
||||
|
||||
def find(self, name, path=None):
|
||||
finder = importlib.FrozenImporter()
|
||||
finder = machinery.FrozenImporter
|
||||
return finder.find_module(name, path)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue