1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
import sys
import types
from abc import ABCMeta
from importlib.machinery import ModuleSpec
if sys.version_info >= (3, 10):
class Loader(metaclass=ABCMeta):
def load_module(self, fullname: str) -> types.ModuleType: ...
if sys.version_info < (3, 12):
def module_repr(self, module: types.ModuleType) -> str: ...
def create_module(self, spec: ModuleSpec) -> types.ModuleType | None: ...
# Not defined on the actual class for backwards-compatibility reasons,
# but expected in new code.
def exec_module(self, module: types.ModuleType) -> None: ...
|