Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion stdlib/importlib/util.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ from importlib._bootstrap_external import (
spec_from_file_location as spec_from_file_location,
)
from importlib.abc import Loader
from typing_extensions import ParamSpec, deprecated
from types import TracebackType
from typing import Literal
from typing_extensions import ParamSpec, Self, deprecated

_P = ParamSpec("_P")

Expand Down Expand Up @@ -44,6 +46,16 @@ class LazyLoader(Loader):

def source_hash(source_bytes: ReadableBuffer) -> bytes: ...

if sys.version_info >= (3, 12):
class _incompatible_extension_module_restrictions:
def __init__(self, *, disable_check: bool) -> None: ...
def __enter__(self) -> Self: ...
def __exit__(
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
) -> None: ...
@property
def override(self) -> Literal[-1, 1]: ... # undocumented

if sys.version_info >= (3, 14):
__all__ = [
"LazyLoader",
Expand Down