Fix _thread.interrupt_main for 3.10+ (#12586)

This commit is contained in:
Max Muoto
2024-08-29 10:10:17 -05:00
committed by GitHub
parent 039c6bcdb1
commit 70e9748f18
2 changed files with 8 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
import signal
import sys
from _typeshed import structseq
from collections.abc import Callable
@@ -25,7 +26,13 @@ class LockType:
def start_new_thread(function: Callable[[Unpack[_Ts]], object], args: tuple[Unpack[_Ts]], /) -> int: ...
@overload
def start_new_thread(function: Callable[..., object], args: tuple[Any, ...], kwargs: dict[str, Any], /) -> int: ...
def interrupt_main() -> None: ...
if sys.version_info >= (3, 10):
def interrupt_main(signum: signal.Signals = ..., /) -> None: ...
else:
def interrupt_main() -> None: ...
def exit() -> NoReturn: ...
def allocate_lock() -> LockType: ...
def get_ident() -> int: ...