Skip to content

Commit 0080036

Browse files
committed
add importlib.util._incompatible_extension_module_restrictions
1 parent 017aed4 commit 0080036

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

stdlib/importlib/util.pyi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from types import TracebackType
2+
from _typeshed import Self
13
import importlib.machinery
24
import sys
35
import types
@@ -44,6 +46,14 @@ class LazyLoader(Loader):
4446

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

49+
if sys.version_info >= (3, 12):
50+
class _incompatible_extension_module_restrictions:
51+
def __init__(self, *, disable_check: bool) -> None: ...
52+
def __enter__(self) -> Self: ...
53+
def __exit__(
54+
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
55+
) -> None: ...
56+
4757
if sys.version_info >= (3, 14):
4858
__all__ = [
4959
"LazyLoader",

0 commit comments

Comments
 (0)