mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Add _thread.start_joinable_thread and _thread.lock for 3.13 (#12588)
This commit is contained in:
@@ -184,9 +184,6 @@ xml.sax.expatreader
|
||||
# Module members that exist at runtime, but are missing from stubs
|
||||
# ==========
|
||||
_json.encode_basestring
|
||||
_thread.LockType.acquire_lock
|
||||
_thread.LockType.locked_lock
|
||||
_thread.LockType.release_lock
|
||||
_thread.RLock
|
||||
_thread.allocate
|
||||
_thread.exit_thread
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
# =========================
|
||||
|
||||
# TODO: triage these new errors
|
||||
_thread.lock
|
||||
_thread.start_joinable_thread
|
||||
_tkinter.create
|
||||
doctest.TestResults.__doc__
|
||||
doctest.TestResults.__new__
|
||||
|
||||
@@ -17,11 +17,28 @@ class LockType:
|
||||
def acquire(self, blocking: bool = True, timeout: float = -1) -> bool: ...
|
||||
def release(self) -> None: ...
|
||||
def locked(self) -> bool: ...
|
||||
def acquire_lock(self, blocking: bool = True, timeout: float = -1) -> bool: ...
|
||||
def release_lock(self) -> None: ...
|
||||
def locked_lock(self) -> bool: ...
|
||||
def __enter__(self) -> bool: ...
|
||||
def __exit__(
|
||||
self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
@final
|
||||
class _ThreadHandle:
|
||||
ident: int
|
||||
|
||||
def join(self, timeout: float | None = None, /) -> None: ...
|
||||
def is_done(self) -> bool: ...
|
||||
def _set_done(self) -> None: ...
|
||||
|
||||
def start_joinable_thread(
|
||||
function: Callable[[], object], handle: _ThreadHandle | None = None, daemon: bool = True
|
||||
) -> _ThreadHandle: ...
|
||||
lock = LockType
|
||||
|
||||
@overload
|
||||
def start_new_thread(function: Callable[[Unpack[_Ts]], object], args: tuple[Unpack[_Ts]], /) -> int: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user