/third_party/python/Lib/ |
D | py_compile.py | 7 import importlib._bootstrap_external 8 import importlib.machinery 9 import importlib.util 129 cfile = importlib.util.cache_from_source(file, 132 cfile = importlib.util.cache_from_source(file) 141 loader = importlib.machinery.SourceFileLoader('<py_compile>', file) 162 bytecode = importlib._bootstrap_external._code_to_timestamp_pyc( 165 source_hash = importlib.util.source_hash(source_bytes) 166 bytecode = importlib._bootstrap_external._code_to_hash_pyc( 171 mode = importlib._bootstrap_external._calc_mode(file) [all …]
|
D | imp.py | 19 from importlib._bootstrap import _ERR_MSG, _exec, _load, _builtin_from_name 20 from importlib._bootstrap_external import SourcelessFileLoader 22 from importlib import machinery 23 from importlib import util 24 import importlib 315 return importlib.reload(module) 336 import importlib.machinery 337 loader = importlib.machinery.ExtensionFileLoader(name, path) 341 spec = importlib.machinery.ModuleSpec(
|
D | pkgutil.py | 5 import importlib 6 import importlib.util 7 import importlib.machinery 35 return importlib.util.spec_from_loader(name, loader) 46 if magic != importlib.util.MAGIC_NUMBER: 185 importlib.machinery.FileFinder, _iter_file_finder_modules) 192 imp = importlib.import_module('imp') 449 pkg = importlib.import_module(pkg_name) 495 spec = importlib.util.find_spec(fullname) 621 spec = importlib.util.find_spec(package) [all …]
|
D | modulefinder.py | 4 import importlib._bootstrap_external 5 import importlib.machinery 60 importlib.machinery.PathFinder.invalidate_caches() 62 spec = importlib.machinery.PathFinder.find_spec(name, path) 69 if spec.loader is importlib.machinery.BuiltinImporter: 72 if spec.loader is importlib.machinery.FrozenImporter: 80 if isinstance(spec.loader, importlib.machinery.SourceFileLoader): 83 elif isinstance(spec.loader, importlib.machinery.ExtensionFileLoader): 86 elif isinstance(spec.loader, importlib.machinery.SourcelessFileLoader): 280 suffixes += importlib.machinery.EXTENSION_SUFFIXES[:] [all …]
|
/third_party/python/Tools/importbench/ |
D | importbench.py | 10 import importlib 11 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)) [all …]
|
/third_party/python/Lib/test/test_import/ |
D | __init__.py | 5 import importlib.util 6 from importlib._bootstrap_external import _get_sourcefile 71 importlib.invalidate_caches() 86 from importlib import something_that_should_not_exist_anywhere 168 importlib.invalidate_caches() 213 importlib.invalidate_caches() 241 importlib.invalidate_caches() 304 self.assertRaises(ZeroDivisionError, importlib.reload, mod) 333 importlib.invalidate_caches() 371 compiled = importlib.util.cache_from_source(source) [all …]
|
/third_party/libabigail/tests/ |
D | mockfedabipkgdiff.in | 74 import importlib.machinery 75 loader = importlib.machinery.SourceFileLoader(name, path) 76 import importlib.util 77 spec = importlib.util.spec_from_loader(name, loader) 78 module = importlib.util.module_from_spec(spec) 86 import importlib.machinery 87 loader = importlib.machinery.SourceFileLoader(name, path)
|
/third_party/python/Lib/test/ |
D | test_zipimport.py | 4 import importlib 5 import importlib.util 40 pyc = (importlib.util.MAGIC_NUMBER + 58 pyc_file = importlib.util.cache_from_source(TESTMOD + '.py') 136 mod = importlib.import_module(".".join(modules)) 194 source_hash = importlib.util.source_hash(source) 195 bytecode = importlib._bootstrap_external._code_to_hash_pyc( 209 source_hash = importlib.util.source_hash(source) 210 bytecode = importlib._bootstrap_external._code_to_hash_pyc( 318 mod = importlib.import_module(TESTPACK) [all …]
|
D | test_doctest.py | 12 import importlib 13 import importlib.abc 14 import importlib.util 736 mod = importlib.import_module(pkg_name) 2702 class TestImporter(importlib.abc.MetaPathFinder, importlib.abc.ResourceLoader): 2705 return importlib.util.spec_from_file_location(fullname, path, loader=self)
|
D | test_cmd_line_script.py | 4 import importlib 5 import importlib.machinery 82 importlib.invalidate_caches() 89 importlib.invalidate_caches() 155 expected = repr(importlib.machinery.BuiltinImporter).encode("utf-8") 168 expected = repr(importlib.machinery.BuiltinImporter).encode("utf-8") 223 importlib.machinery.SourceFileLoader, 236 importlib.machinery.SourceFileLoader) 246 importlib.machinery.SourcelessFileLoader) 253 importlib.machinery.SourceFileLoader) [all …]
|
D | test_compileall.py | 4 import importlib.util 41 return importlib.util.cache_from_source(script, optimization=opt) 60 self.bc_path = importlib.util.cache_from_source(self.source_path) 64 self.bc_path2 = importlib.util.cache_from_source(self.source_path2) 83 compare = struct.pack('<4sLL', importlib.util.MAGIC_NUMBER, 0, 125 self.recreation_check(struct.pack('<4sLL', importlib.util.MAGIC_NUMBER, 206 cached = importlib.util.cache_from_source(self.source_path, 209 cached2 = importlib.util.cache_from_source(self.source_path2, 212 cached3 = importlib.util.cache_from_source(self.source_path3, 264 pyc_filename = importlib.util.cache_from_source(source) [all …]
|
D | test_asdl_parser.py | 3 import importlib.machinery 4 import importlib.util 28 loader = importlib.machinery.SourceFileLoader( 30 spec = importlib.util.spec_from_loader('asdl', loader) 31 module = importlib.util.module_from_spec(spec)
|
D | test_reprlib.py | 9 import importlib 10 import importlib.util 242 importlib.invalidate_caches() 267 len(importlib.util.cache_from_source("x.py")) - len("x.py")) 281 importlib.invalidate_caches() 294 importlib.invalidate_caches() 311 importlib.invalidate_caches() 322 importlib.invalidate_caches() 335 importlib.invalidate_caches()
|
D | test_runpy.py | 3 import importlib.machinery, importlib.util 164 mod_spec = importlib.machinery.ModuleSpec(mod_name, 248 mod_spec = importlib.util.spec_from_file_location(mod_name, 282 new_spec = importlib.util.spec_from_file_location(spec.name, 315 importlib.invalidate_caches() 321 importlib.invalidate_caches() 341 "__cached__": importlib.util.cache_from_source(mod_fname), 356 importlib.invalidate_caches() 363 importlib.invalidate_caches() 415 importlib.invalidate_caches() [all …]
|
D | test_py_compile.py | 2 import importlib.util 59 self.cache_path = importlib.util.cache_from_source(self.source_path) 139 importlib.util.cache_from_source(bad_coding))) 146 flags = importlib._bootstrap_external._classify_pyc( 160 cache_path = importlib.util.cache_from_source(weird_path) 185 flags = importlib._bootstrap_external._classify_pyc( 193 flags = importlib._bootstrap_external._classify_pyc( 226 self.cache_path = importlib.util.cache_from_source(self.source_path)
|
/third_party/python/Doc/library/ |
D | importlib.rst | 1 :mod:`!importlib` --- The implementation of :keyword:`!import` 4 .. module:: importlib 12 **Source code:** :source:`Lib/importlib/__init__.py` 19 The purpose of the :mod:`importlib` package is two-fold. One is to provide the 102 :func:`importlib.__import__`. This means all semantics of the function are 103 derived from :func:`importlib.__import__`. The most important difference 136 Use :func:`importlib.util.find_spec` instead. 211 a :class:`~importlib.machinery.ModuleSpec`. 214 :mod:`importlib.abc` -- Abstract base classes related to import 217 .. module:: importlib.abc [all …]
|
D | importlib.metadata.rst | 4 Using :mod:`!importlib.metadata` 7 .. module:: importlib.metadata 8 :synopsis: The implementation of the importlib metadata. 12 ``importlib.metadata`` is no longer provisional. 14 **Source code:** :source:`Lib/importlib/metadata/__init__.py` 16 ``importlib.metadata`` is a library that provides for access to installed 20 :mod:`importlib.resources` in Python 3.7 53 >>> from importlib.metadata import version # doctest: +SKIP 214 <importlib.metadata._hooks.PathDistribution object at 0x101e0cef0> 263 …{'importlib_metadata': ['importlib-metadata'], 'yaml': ['PyYAML'], 'jaraco': ['jaraco.classes', 'j… [all …]
|
D | pkgutil.rst | 66 is now fully :pep:`302` compliant and available in :mod:`importlib`. 75 is now fully :pep:`302` compliant and available in :mod:`importlib`. 83 :func:`importlib.util.find_spec` that converts most failures to 88 Updated to be based directly on :mod:`importlib` rather than relying 105 Updated to be based directly on :mod:`importlib` rather than relying 120 Updated to be based directly on :mod:`importlib` rather than relying 141 Updated to be based directly on :mod:`importlib` rather than relying 158 implementations for :class:`importlib.machinery.FileFinder` and 162 Updated to be based directly on :mod:`importlib` rather than relying 197 implementations for :class:`importlib.machinery.FileFinder` and [all …]
|
/third_party/python/Lib/test/support/ |
D | import_helper.py | 2 import importlib 3 import importlib.util 48 unlink(importlib.util.cache_from_source(source, optimization=opt)) 58 pyc_file = importlib.util.cache_from_source(source) 76 return importlib.import_module(name) 137 return importlib.import_module(name)
|
/third_party/python/Lib/test/test_importlib/extension/ |
D | test_case_sensitivity.py | 1 from importlib import _bootstrap_external 7 importlib = util.import_importlib('importlib') variable 43 ) = util.test_both(ExtensionModuleCaseSensitivityTest, importlib=importlib,
|
/third_party/python/Lib/test/test_importlib/source/ |
D | test_case_sensitivity.py | 6 importlib = util.import_importlib('importlib') variable 75 ) = util.test_both(CaseSensitivityTestPEP302, importlib=importlib, 87 ) = util.test_both(CaseSensitivityTestPEP451, importlib=importlib,
|
/third_party/python/Lib/test/test_importlib/ |
D | test_main.py | 7 import importlib.metadata 15 from importlib.metadata import ( 57 importlib.import_module('does_not_exist') 73 assert ep.load() is importlib.metadata 199 importlib.metadata.distributions() 215 list(importlib.metadata.distributions()) 221 self.ep = importlib.metadata.EntryPoint('name', 'value', 'group')
|
D | test_lazy.py | 1 import importlib 2 from importlib import abc 3 from importlib import util 84 module = importlib.import_module(importer.module_name)
|
/third_party/python/Lib/test/test_importlib/import_/ |
D | test_path.py | 3 importlib = util.import_importlib('importlib') variable 105 *self.importlib._bootstrap_external._get_supported_file_loaders())] 113 module = self.importlib.import_module('email') 229 ) = util.test_both(FindModuleTests, importlib=importlib, machinery=machinery) 241 ) = util.test_both(FindSpecTests, importlib=importlib, machinery=machinery)
|
/third_party/python/Lib/idlelib/ |
D | pathbrowser.py | 1 import importlib.machinery 84 suffixes = importlib.machinery.EXTENSION_SUFFIXES[:] 85 suffixes += importlib.machinery.SOURCE_SUFFIXES 86 suffixes += importlib.machinery.BYTECODE_SUFFIXES
|