Home
last modified time | relevance | path

Searched refs:machinery (Results 1 – 25 of 169) sorted by relevance

1234567

/external/python/cpython3/Lib/test/test_importlib/frozen/
Dtest_loader.py4 machinery = util.import_importlib('importlib.machinery') variable
16 spec = self.machinery.ModuleSpec(
17 name, self.machinery.FrozenImporter, origin='frozen',
18 is_package=self.machinery.FrozenImporter.is_package(name))
22 self.machinery.FrozenImporter.exec_module(module)
67 repr_str = self.machinery.FrozenImporter.module_repr(module)
81 assert self.machinery.FrozenImporter.find_module('_not_real') is None
89 ) = util.test_both(ExecModuleTests, machinery=machinery)
98 module = self.machinery.FrozenImporter.load_module('__hello__')
101 '__loader__': self.machinery.FrozenImporter,
[all …]
Dtest_finder.py4 machinery = util.import_importlib('importlib.machinery') variable
14 finder = self.machinery.FrozenImporter
43 ) = util.test_both(FindSpecTests, machinery=machinery)
51 finder = self.machinery.FrozenImporter
80 ) = util.test_both(FinderTests, machinery=machinery)
/external/python/cpython3/Lib/test/test_importlib/
Dtest_windows.py2 machinery = test_util.import_importlib('importlib.machinery') variable
37 def setup_module(machinery, name, path=None): argument
38 if machinery.WindowsRegistryFinder.DEBUG_BUILD:
39 root = machinery.WindowsRegistryFinder.REGISTRY_KEY_DEBUG
41 root = machinery.WindowsRegistryFinder.REGISTRY_KEY
52 if machinery.WindowsRegistryFinder.DEBUG_BUILD:
64 spec = self.machinery.WindowsRegistryFinder.find_spec('spam')
68 loader = self.machinery.WindowsRegistryFinder.find_module('spam')
72 with setup_module(self.machinery, self.test_module):
73 loader = self.machinery.WindowsRegistryFinder.find_module(self.test_module)
[all …]
Dtest_spec.py4 machinery = test_util.import_importlib('importlib.machinery') variable
72 self.spec = self.machinery.ModuleSpec(self.name, self.loader)
73 self.loc_spec = self.machinery.ModuleSpec(self.name, self.loader,
78 spec = self.machinery.ModuleSpec(self.name, self.loader)
89 spec = self.machinery.ModuleSpec(self.name, None)
100 spec = self.machinery.ModuleSpec(self.name, self.loader,
112 spec = self.machinery.ModuleSpec(self.name, self.loader,
124 spec = self.machinery.ModuleSpec(self.name, self.loader,
171 spec = self.machinery.ModuleSpec('spam.eggs', self.loader)
176 spec = self.machinery.ModuleSpec('spam.eggs', self.loader,
[all …]
Dtest_util.py4 machinery = util.import_importlib('importlib.machinery') variable
50 spec = self.machinery.ModuleSpec('test', Loader())
58 spec = self.machinery.ModuleSpec('test', Loader())
72 spec = self.machinery.ModuleSpec('test', Loader())
78 spec = self.machinery.ModuleSpec('test', object())
83 spec = self.machinery.ModuleSpec('test', object())
89 spec = self.machinery.ModuleSpec('test', loader)
94 spec = self.machinery.ModuleSpec('test.pkg', object())
99 spec = self.machinery.ModuleSpec('test', object(), is_package=True)
104 spec = self.machinery.ModuleSpec('test', object(), origin='some/path')
[all …]
Dtest_api.py5 machinery = test_util.import_importlib('importlib.machinery') variable
177 return machinery['Source'].ModuleSpec(name, (name, path))
439 if self.machinery.BuiltinImporter.find_module(name):
441 elif self.machinery.FrozenImporter.find_module(name):
449 if self.machinery.BuiltinImporter.find_module(name):
451 elif self.machinery.FrozenImporter.find_module(name):
457 ) = test_util.test_both(StartupTests, machinery=machinery)
/external/python/cpython3/Lib/test/test_importlib/import_/
Dtest_path.py4 machinery = util.import_importlib('importlib.machinery') variable
103 self.machinery.FileFinder.path_hook(
127 self.machinery.PathFinder.find_spec('whatever', [path]))
131 spec = self.machinery.PathFinder.find_spec('whatever', [path])
143 self.machinery.PathFinder.find_spec('whatever', [path]))
147 spec = self.machinery.PathFinder.find_spec('whatever', [path])
158 self.machinery.PathFinder.find_spec('whatever', [path]))
160 success_finder.spec = self.machinery.ModuleSpec('whatever', __loader__)
162 got = self.machinery.PathFinder.find_spec('whatever', [path])
185 self.assertIsNone(self.machinery.PathFinder.find_spec('whatever'))
[all …]
/external/python/cpython3/Lib/test/test_importlib/source/
Dtest_finder.py4 machinery = util.import_importlib('importlib.machinery') variable
42 loader_details = [(self.machinery.SourceFileLoader,
43 self.machinery.SOURCE_SUFFIXES),
44 (self.machinery.SourcelessFileLoader,
45 self.machinery.BYTECODE_SUFFIXES)]
46 return self.machinery.FileFinder(root, *loader_details)
128 finder = self.machinery.FileFinder('', (self.machinery.SourceFileLoader,
129 self.machinery.SOURCE_SUFFIXES))
140 finder = self.machinery.FileFinder('', (self.machinery.SourceFileLoader,
141 self.machinery.SOURCE_SUFFIXES))
[all …]
Dtest_case_sensitivity.py5 machinery = util.import_importlib('importlib.machinery') variable
23 return self.machinery.FileFinder(path,
24 (self.machinery.SourceFileLoader,
25 self.machinery.SOURCE_SUFFIXES),
26 (self.machinery.SourcelessFileLoader,
27 self.machinery.BYTECODE_SUFFIXES))
69 machinery=machinery)
81 machinery=machinery)
Dtest_source_encoding.py3 machinery = util.import_importlib('importlib.machinery') variable
41 loader = self.machinery.SourceFileLoader(self.module_name,
102 ) = util.test_both(EncodingTestPEP451, machinery=machinery)
115 ) = util.test_both(EncodingTestPEP302, machinery=machinery)
130 loader = self.machinery.SourceFileLoader(module_name,
158 ) = util.test_both(LineEndingTestPEP451, machinery=machinery)
171 ) = util.test_both(LineEndingTestPEP302, machinery=machinery)
Dtest_path_hook.py3 machinery = util.import_importlib('importlib.machinery') variable
13 return self.machinery.FileFinder.path_hook((self.machinery.SourceFileLoader,
14 self.machinery.SOURCE_SUFFIXES))
37 ) = util.test_both(PathHookTest, machinery=machinery)
Dtest_file_loader.py6 machinery = util.import_importlib('importlib.machinery') variable
36 self.loader = self.machinery.SourceFileLoader(self.name, self.filepath)
67 other = self.machinery.SourceFileLoader(self.name, self.filepath)
71 other = self.machinery.SourceFileLoader('_' + self.name, self.filepath)
77 loader = self.machinery.SourceFileLoader('_temp', mapping['_temp'])
89 loader = self.machinery.SourceFileLoader('_pkg',
104 loader = self.machinery.SourceFileLoader('_pkg.mod',
121 loader = self.machinery.SourceFileLoader('_temp', mapping['_temp'])
150 loader = self.machinery.SourceFileLoader('_temp', mapping['_temp'])
167 loader = self.machinery.SourceFileLoader('_temp', mapping['_temp'])
[all …]
/external/python/cpython3/Lib/test/test_importlib/builtin/
Dtest_finder.py4 machinery = util.import_importlib('importlib.machinery') variable
18 found = self.machinery.BuiltinImporter.find_spec(util.BUILTINS.good_name)
37 spec = self.machinery.BuiltinImporter.find_spec(name)
43 spec = self.machinery.BuiltinImporter.find_spec(util.BUILTINS.good_name,
50 ) = util.test_both(FindSpecTests, machinery=machinery)
61 found = self.machinery.BuiltinImporter.find_module(util.BUILTINS.good_name)
73 loader = self.machinery.BuiltinImporter.find_module('importlib')
79 loader = self.machinery.BuiltinImporter.find_module(util.BUILTINS.good_name,
86 ) = util.test_both(FinderTests, machinery=machinery)
Dtest_loader.py4 machinery = util.import_importlib('importlib.machinery') variable
17 '__loader__': self.machinery.BuiltinImporter}
27 return self.machinery.BuiltinImporter.load_module(name)
70 ) = util.test_both(LoaderTests, machinery=machinery)
80 result = self.machinery.BuiltinImporter.get_code(util.BUILTINS.good_name)
85 result = self.machinery.BuiltinImporter.get_source(util.BUILTINS.good_name)
90 result = self.machinery.BuiltinImporter.is_package(util.BUILTINS.good_name)
97 method = getattr(self.machinery.BuiltinImporter, meth_name)
104 ) = util.test_both(InspectLoaderTests, machinery=machinery)
/external/python/cpython3/Lib/importlib/
Dabc.py4 from . import machinery
83 _register(MetaPathFinder, machinery.BuiltinImporter, machinery.FrozenImporter,
84 machinery.PathFinder, machinery.WindowsRegistryFinder)
133 _register(PathEntryFinder, machinery.FileFinder)
249 _register(InspectLoader, machinery.BuiltinImporter, machinery.FrozenImporter)
286 _register(ExecutionLoader, machinery.ExtensionFileLoader)
294 _register(FileLoader, machinery.SourceFileLoader,
295 machinery.SourcelessFileLoader)
342 _register(SourceLoader, machinery.SourceFileLoader)
388 _register(ResourceReader, machinery.SourceFileLoader)
/external/python/cpython3/Lib/test/test_importlib/extension/
Dtest_path_hook.py3 machinery = util.import_importlib('importlib.machinery') variable
15 return self.machinery.FileFinder.path_hook(
16 (self.machinery.ExtensionFileLoader,
17 self.machinery.EXTENSION_SUFFIXES))(entry)
27 ) = util.test_both(PathHookTests, machinery=machinery)
Dtest_finder.py4 machinery = util.import_importlib('importlib.machinery') variable
15 importer = self.machinery.FileFinder(util.EXTENSIONS.path,
16 (self.machinery.ExtensionFileLoader,
17 self.machinery.EXTENSION_SUFFIXES))
40 ) = util.test_both(FinderTests, machinery=machinery)
Dtest_loader.py4 machinery = util.import_importlib('importlib.machinery') variable
19 self.loader = self.machinery.ExtensionFileLoader(util.EXTENSIONS.name,
33 other = self.machinery.ExtensionFileLoader(util.EXTENSIONS.name,
38 other = self.machinery.ExtensionFileLoader('_' + util.EXTENSIONS.name,
51 self.machinery.ExtensionFileLoader)
76 for suffix in self.machinery.EXTENSION_SUFFIXES:
78 loader = self.machinery.ExtensionFileLoader('pkg', path)
83 ) = util.test_both(LoaderTests, machinery=machinery)
91 finder = self.machinery.FileFinder(None)
94 self.loader = self.machinery.ExtensionFileLoader(
[all …]
Dtest_case_sensitivity.py8 machinery = util.import_importlib('importlib.machinery') variable
19 finder = self.machinery.FileFinder(util.EXTENSIONS.path,
20 (self.machinery.ExtensionFileLoader,
21 self.machinery.EXTENSION_SUFFIXES))
42 machinery=machinery)
/external/python/cpython3/Lib/
Dimp.py22 from importlib import machinery
107 extensions = [(s, 'rb', C_EXTENSION) for s in machinery.EXTENSION_SUFFIXES]
108 source = [(s, 'r', PY_SOURCE) for s in machinery.SOURCE_SUFFIXES]
109 bytecode = [(s, 'rb', PY_COMPILED) for s in machinery.BYTECODE_SUFFIXES]
160 class _LoadSourceCompatibility(_HackedGetData, machinery.SourceFileLoader):
174 module.__loader__ = machinery.SourceFileLoader(name, pathname)
202 extensions = (machinery.SOURCE_SUFFIXES[:] +
203 machinery.BYTECODE_SUFFIXES[:])
282 for suffix in ['.py', machinery.BYTECODE_SUFFIXES[0]]:
335 import importlib.machinery
[all …]
/external/python/cpython3/Tools/importbench/
Dimportbench.py11 import importlib.machinery
69 sys.meta_path.append(importlib.machinery.PathFinder)
70 loader = (importlib.machinery.SourceFileLoader,
71 importlib.machinery.SOURCE_SUFFIXES)
72 sys.path_hooks.append(importlib.machinery.FileFinder.path_hook(loader))
105 sys.meta_path.append(importlib.machinery.PathFinder)
106 loader = (importlib.machinery.SourceFileLoader,
107 importlib.machinery.SOURCE_SUFFIXES)
108 sys.path_hooks.append(importlib.machinery.FileFinder.path_hook(loader))
139 sys.meta_path.append(importlib.machinery.PathFinder)
[all …]
/external/python/cpython3/Lib/idlelib/
Dpathbrowser.py1 import importlib.machinery
84 suffixes = importlib.machinery.EXTENSION_SUFFIXES[:]
85 suffixes += importlib.machinery.SOURCE_SUFFIXES
86 suffixes += importlib.machinery.BYTECODE_SUFFIXES
/external/python/cpython3/Lib/test/
Dtest_cmd_line_script.py5 import importlib.machinery
153 expected = repr(importlib.machinery.BuiltinImporter).encode("utf-8")
166 expected = repr(importlib.machinery.BuiltinImporter).encode("utf-8")
221 importlib.machinery.SourceFileLoader)
231 importlib.machinery.SourcelessFileLoader)
238 importlib.machinery.SourceFileLoader)
248 importlib.machinery.SourcelessFileLoader)
284 importlib.machinery.SourceFileLoader,
309 importlib.machinery.SourceFileLoader,
322 importlib.machinery.SourcelessFileLoader,
[all …]
Dtest_modulefinder.py3 import importlib.machinery
304 source_path = base_path + importlib.machinery.SOURCE_SUFFIXES[0]
305 bytecode_path = base_path + importlib.machinery.BYTECODE_SUFFIXES[0]
/external/python/cpython3/Doc/reference/
Dimport.rst8 .. index:: single: import machinery
12 the most common way of invoking the import machinery, but it is not the only
14 :func:`__import__` can also be used to invoke the import machinery.
39 strategies to search for the named module when the import machinery is
45 of :pep:`302`. There is no longer any implicit import machinery - the full
56 import machinery. Refer to the :mod:`importlib` library documentation for
228 The import machinery is extensible, so new finders can be added to extend the
233 information, which the import machinery then uses when loading the module.
237 import machinery.
255 The import machinery is designed to be extensible; the primary mechanism for
[all …]

1234567