Add a few missing things from _thread (#13132)

This commit is contained in:
Stephen Morton
2024-11-26 19:57:01 -08:00
committed by GitHub
parent 693add9512
commit 6cbcecd01c
2 changed files with 8 additions and 3 deletions

View File

@@ -90,9 +90,6 @@ xml.sax.expatreader
# ==========
_json.encode_basestring
_thread.RLock
_thread.allocate
_thread.exit_thread
_thread.start_new
_threading_local._localimpl.localargs
_threading_local._localimpl.locallock
builtins.SyntaxError.print_file_and_line

View File

@@ -44,6 +44,12 @@ def start_new_thread(function: Callable[[Unpack[_Ts]], object], args: tuple[Unpa
@overload
def start_new_thread(function: Callable[..., object], args: tuple[Any, ...], kwargs: dict[str, Any], /) -> int: ...
# Obsolete synonym for start_new_thread()
@overload
def start_new(function: Callable[[Unpack[_Ts]], object], args: tuple[Unpack[_Ts]], /) -> int: ...
@overload
def start_new(function: Callable[..., object], args: tuple[Any, ...], kwargs: dict[str, Any], /) -> int: ...
if sys.version_info >= (3, 10):
def interrupt_main(signum: signal.Signals = ..., /) -> None: ...
@@ -51,7 +57,9 @@ else:
def interrupt_main() -> None: ...
def exit() -> NoReturn: ...
def exit_thread() -> NoReturn: ... # Obsolete synonym for exit()
def allocate_lock() -> LockType: ...
def allocate() -> LockType: ... # Obsolete synonym for allocate_lock()
def get_ident() -> int: ...
def stack_size(size: int = 0, /) -> int: ...