mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-09 06:46:18 +08:00
threading updates for 3.14 (#14032)
This commit is contained in:
@@ -141,8 +141,6 @@ string.templatelib
|
||||
sys.is_remote_debug_enabled
|
||||
sys.remote_exec
|
||||
tarfile.TarFile.zstopen
|
||||
threading.Thread.__init__
|
||||
threading._RLock.locked
|
||||
tkinter.Event.__class_getitem__
|
||||
turtle.__all__
|
||||
turtle.RawTurtle.fill
|
||||
|
||||
+28
-10
@@ -3,6 +3,7 @@ import sys
|
||||
from _thread import _excepthook, _ExceptHookArgs, get_native_id as get_native_id
|
||||
from _typeshed import ProfileFunction, TraceFunction
|
||||
from collections.abc import Callable, Iterable, Mapping
|
||||
from contextvars import ContextVar
|
||||
from types import TracebackType
|
||||
from typing import Any, TypeVar, final
|
||||
from typing_extensions import deprecated
|
||||
@@ -76,16 +77,30 @@ class Thread:
|
||||
@property
|
||||
def ident(self) -> int | None: ...
|
||||
daemon: bool
|
||||
def __init__(
|
||||
self,
|
||||
group: None = None,
|
||||
target: Callable[..., object] | None = None,
|
||||
name: str | None = None,
|
||||
args: Iterable[Any] = (),
|
||||
kwargs: Mapping[str, Any] | None = None,
|
||||
*,
|
||||
daemon: bool | None = None,
|
||||
) -> None: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
def __init__(
|
||||
self,
|
||||
group: None = None,
|
||||
target: Callable[..., object] | None = None,
|
||||
name: str | None = None,
|
||||
args: Iterable[Any] = (),
|
||||
kwargs: Mapping[str, Any] | None = None,
|
||||
*,
|
||||
daemon: bool | None = None,
|
||||
context: ContextVar[Any] | None = None,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
group: None = None,
|
||||
target: Callable[..., object] | None = None,
|
||||
name: str | None = None,
|
||||
args: Iterable[Any] = (),
|
||||
kwargs: Mapping[str, Any] | None = None,
|
||||
*,
|
||||
daemon: bool | None = None,
|
||||
) -> None: ...
|
||||
|
||||
def start(self) -> None: ...
|
||||
def run(self) -> None: ...
|
||||
def join(self, timeout: float | None = None) -> None: ...
|
||||
@@ -116,6 +131,9 @@ class _RLock:
|
||||
__enter__ = acquire
|
||||
def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
def locked(self) -> bool: ...
|
||||
|
||||
RLock = _thread.RLock # Actually a function at runtime.
|
||||
|
||||
class Condition:
|
||||
|
||||
Reference in New Issue
Block a user