Searched refs:__spec__ (Results 1 – 25 of 43) sorted by relevance
12
/external/python/cpython3/Lib/importlib/ |
D | resources.py | 41 if package.__spec__.submodule_search_locations is None: 43 package.__spec__.name)) 48 if module.__spec__.submodule_search_locations is None: 73 spec = package.__spec__ 81 if package.__spec__.origin is None or not package.__spec__.has_location: 93 absolute_package_path = os.path.abspath(package.__spec__.origin) 102 loader = cast(ResourceLoader, package.__spec__.loader) 104 if hasattr(package.__spec__.loader, 'get_data'): 108 package_name = package.__spec__.name 127 absolute_package_path = os.path.abspath(package.__spec__.origin) [all …]
|
D | util.py | 64 spec = module.__spec__ 109 spec = module.__spec__ 231 original_name = self.__spec__.name 234 attrs_then = self.__spec__.loader_state['__dict__'] 235 original_type = self.__spec__.loader_state['__class__'] 245 self.__spec__.loader.exec_module(self) 290 module.__spec__.loader = self.loader 299 module.__spec__.loader_state = loader_state
|
D | _bootstrap.py | 281 spec = module.__spec__ 309 self._spec = module.__spec__ 462 spec = module.__spec__ 549 module.__spec__ = spec 658 module.__spec__ = spec 814 name = module.__spec__.name 912 __spec__ = module.__spec__ 919 if __spec__ is None: 922 return __spec__
|
D | __init__.py | 142 name = module.__spec__.name 166 spec = module.__spec__ = _bootstrap._find_spec(name, pkgpath, target)
|
/external/python/cpython3/Doc/library/ |
D | runpy.rst | 52 The special global variables ``__name__``, ``__spec__``, ``__file__``, 62 ``__spec__`` will be set appropriately for the *actually* imported 63 module (that is, ``__spec__.name`` will always be *mod_name* or 94 accessible as ``__spec__.name``. 121 The special global variables ``__name__``, ``__spec__``, ``__file__``, 132 supplied path, and ``__spec__``, ``__cached__``, ``__loader__`` and 136 ``__spec__`` will be set appropriately for the imported ``__main__`` 137 module (that is, ``__spec__.name`` will always be ``__main__``).
|
/external/python/cpython3/Lib/test/test_importlib/ |
D | test_resource.py | 91 module.__spec__.loader = module.__loader__ 92 module.__spec__.origin = module.__file__
|
D | test_util.py | 85 self.assertEqual(module.__spec__, spec) 414 module.__spec__ = spec 426 module.__spec__ = spec 435 module.__spec__ = None 445 module.__spec__ = spec 455 del module.__spec__
|
D | test_spec.py | 319 self.assertIs(loaded.__spec__, self.spec) 373 del loaded.__spec__ 379 self.assertIs(loaded.__spec__, self.spec) 434 self.module.__spec__ = self.spec 443 self.module.__spec__ = self.spec 451 self.module.__spec__ = self.spec 459 self.module.__spec__ = self.spec
|
D | test_namespace_pkgs.py | 326 self.assertEqual(foo.__loader__, foo.__spec__.loader) 332 self.assertIsNone(foo.__spec__.origin)
|
D | test_api.py | 372 self.assertIsNone(module.__spec__) 450 self.assertIsNot(module.__spec__, None) 452 self.assertIsNot(module.__spec__, None)
|
D | test_abc.py | 454 self.assertEqual(loader, module.__spec__.loader) 456 self.assertEqual(name, module.__spec__.name) 459 module.__spec__.submodule_search_locations) 465 module.__spec__ = self.util.spec_from_loader(name, loader)
|
D | test_lazy.py | 71 module.__spec__ = spec
|
D | util.py | 288 self.module_code[module.__spec__.name]() 443 module.__spec__ = spec
|
/external/python/cpython3/Lib/test/test_importlib/source/ |
D | test_source_encoding.py | 95 module.__spec__ = importlib.util.spec_from_loader(self.module_name, loader) 151 module.__spec__ = importlib.util.spec_from_loader(module_name, loader)
|
D | test_file_loader.py | 215 module.__spec__ = self.util.spec_from_loader('_temp', loader) 233 module.__spec__ = self.machinery.ModuleSpec('bad name', loader) 255 mod.__spec__ = self.util.spec_from_loader('_temp', loader) 287 mod.__spec__ = self.util.spec_from_loader('_temp', loader) 311 mod.__spec__ = self.util.spec_from_loader('_temp', loader) 342 mod.__spec__ = self.util.spec_from_loader('_temp', loader) 512 module.__spec__ = self.util.spec_from_loader(module_name, loader)
|
/external/python/cpython3/Lib/multiprocessing/ |
D | spawn.py | 172 main_mod_name = getattr(main_module.__spec__, "name", None) 239 if getattr(current_main.__spec__, "name", None) == mod_name:
|
/external/python/cpython3/Lib/ |
D | imp.py | 175 module.__spec__.loader = module.__loader__ 195 module.__spec__.loader = module.__loader__
|
D | runpy.py | 84 __spec__ = mod_spec)
|
/external/python/cpython3/Doc/reference/ |
D | import.rst | 521 The module's spec is exposed as the ``__spec__`` attribute on a module object. 561 expected to have the same value as ``__spec__.parent``. 565 ``__spec__.parent``. 567 .. attribute:: __spec__ 569 The ``__spec__`` attribute must be set to the module spec that was 570 used when importing the module. Setting ``__spec__`` 573 where ``__spec__`` is :ref:`set to None in some cases <main_spec>`. 575 When ``__package__`` is not defined, ``__spec__.parent`` is used as 581 ``__spec__.parent`` is used as a fallback when ``__package__`` is 646 If the module has a spec (``__spec__``), the import machinery will try [all …]
|
/external/python/cpython3/Lib/test/test_importlib/frozen/ |
D | test_loader.py | 20 module.__spec__ = spec 25 self.assertEqual(module.__spec__.origin, 'frozen')
|
/external/python/cpython3/Lib/test/ |
D | test_imp.py | 288 self.assertEqual(module.__spec__.name, name) 289 self.assertEqual(module.__spec__.origin, spec.origin)
|
D | test_pkgutil.py | 441 del mod.__spec__ 450 mod.__spec__ = None
|
D | test_module.py | 56 self.assertIs(foo.__spec__, None)
|
D | test_pydoc.py | 901 self.assertEqual(loaded_pydoc.__spec__, pydoc.__spec__)
|
/external/python/cpython3/Misc/NEWS.d/ |
D | 3.7.0b2.rst | 38 ``__spec__.origin`` are set to None. 47 Make sure ``__spec__.loader`` matches ``__loader__`` for namespace packages.
|
12