MCPcopy Index your code
hub / github.com/RustPython/RustPython / _load_module_shim

Function _load_module_shim

Lib/importlib/_bootstrap.py:525–540  ·  view source on GitHub ↗

Load the specified module into sys.modules and return it. This method is deprecated. Use loader.exec_module() instead.

(self, fullname)

Source from the content-addressed store, hash-verified

523
524# Typically used by loader classes as a method replacement.
525def _load_module_shim(self, fullname):
526 """Load the specified module into sys.modules and return it.
527
528 This method is deprecated. Use loader.exec_module() instead.
529
530 """
531 msg = ("the load_module() method is deprecated and slated for removal in "
532 "Python 3.15; use exec_module() instead")
533 _warnings.warn(msg, DeprecationWarning)
534 spec = spec_from_loader(fullname, self)
535 if fullname in sys.modules:
536 module = sys.modules[fullname]
537 _exec(spec, module)
538 return sys.modules[fullname]
539 else:
540 return _load(spec)
541
542# Module specifications #######################################################
543

Callers 1

load_moduleMethod · 0.70

Calls 4

spec_from_loaderFunction · 0.70
_execFunction · 0.70
_loadFunction · 0.70
warnMethod · 0.45

Tested by

no test coverage detected