• Home
  • Raw
  • Download

Lines Matching full:fullname

106     # 'fullname', or whether it could be a portion of a namespace
110 def find_loader(self, fullname, path=None): argument
111 """find_loader(fullname, path=None) -> self, str or None.
113 Search for a module specified by 'fullname'. 'fullname' must be the
125 mi = _get_module_info(self, fullname)
133 # We're only interested in the last path component of fullname
135 modpath = _get_module_path(self, fullname)
146 # 'fullname'. Return self if we can, None if we can't.
147 def find_module(self, fullname, path=None): argument
148 """find_module(fullname, path=None) -> self or None.
150 Search for a module specified by 'fullname'. 'fullname' must be the
161 return self.find_loader(fullname, path)[0]
163 def find_spec(self, fullname, target=None): argument
168 module_info = _get_module_info(self, fullname)
170 return _bootstrap.spec_from_loader(fullname, self, is_package=module_info)
175 # We're only interested in the last path component of fullname
177 modpath = _get_module_path(self, fullname)
183 spec = _bootstrap.ModuleSpec(name=fullname, loader=None,
190 def get_code(self, fullname): argument
191 """get_code(fullname) -> code object.
196 code, ispackage, modpath = _get_module_code(self, fullname)
221 def get_filename(self, fullname): argument
222 """get_filename(fullname) -> filename string.
229 code, ispackage, modpath = _get_module_code(self, fullname)
233 def get_source(self, fullname): argument
234 """get_source(fullname) -> source string.
240 mi = _get_module_info(self, fullname)
242 raise ZipImportError(f"can't find module {fullname!r}", name=fullname)
244 path = _get_module_path(self, fullname)
259 def is_package(self, fullname): argument
260 """is_package(fullname) -> bool.
262 Return True if the module specified by fullname is a package.
265 mi = _get_module_info(self, fullname)
267 raise ZipImportError(f"can't find module {fullname!r}", name=fullname)
271 # Load and return the module named by 'fullname'.
272 def load_module(self, fullname): argument
273 """load_module(fullname) -> module.
275 Load the module specified by 'fullname'. 'fullname' must be the
284 code, ispackage, modpath = _get_module_code(self, fullname)
285 mod = sys.modules.get(fullname)
287 mod = _module_type(fullname)
288 sys.modules[fullname] = mod
295 path = _get_module_path(self, fullname)
301 _bootstrap_external._fix_up_module(mod.__dict__, fullname, modpath)
304 del sys.modules[fullname]
308 mod = sys.modules[fullname]
310 raise ImportError(f'Loaded module {fullname!r} not found in sys.modules')
311 _bootstrap._verbose_message('import {} # loaded from Zip {}', fullname, modpath)
315 def get_resource_reader(self, fullname): argument
318 If 'fullname' is a package within the zip file, return the
322 if not self.is_package(fullname):
327 return ZipReader(self, fullname)
358 def _get_module_path(self, fullname): argument
359 return self.prefix + fullname.rpartition('.')[2]
371 def _get_module_info(self, fullname): argument
372 path = _get_module_path(self, fullname)
635 def _unmarshal_code(self, pathname, fullpath, fullname, data): argument
637 'name': fullname,
641 flags = _bootstrap_external._classify_pyc(data, fullname, exc_details)
656 data, source_hash, fullname, exc_details)
667 f'bytecode is stale for {fullname!r}')
739 # 'fullname'.
740 def _get_module_code(self, fullname): argument
741 path = _get_module_path(self, fullname)
756 code = _unmarshal_code(self, modpath, fullpath, fullname, data)
770 raise ZipImportError(msg, name=fullname) from import_error
772 raise ZipImportError(f"can't find module {fullname!r}", name=fullname)