mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-24 21:01:52 +08:00
threading.ThreadError and threading.local are aliases from _thread (#11167)
This commit is contained in:
@@ -46,3 +46,8 @@ if sys.version_info >= (3, 8):
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
def daemon_threads_allowed() -> bool: ...
|
||||
|
||||
class _local:
|
||||
def __getattribute__(self, __name: str) -> Any: ...
|
||||
def __setattr__(self, __name: str, __value: Any) -> None: ...
|
||||
def __delattr__(self, __name: str) -> None: ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import _thread
|
||||
import sys
|
||||
from _typeshed import ProfileFunction, TraceFunction
|
||||
from collections.abc import Callable, Iterable, Mapping
|
||||
@@ -68,12 +69,8 @@ def stack_size(size: int = ...) -> int: ...
|
||||
|
||||
TIMEOUT_MAX: float
|
||||
|
||||
class ThreadError(Exception): ...
|
||||
|
||||
class local:
|
||||
def __getattribute__(self, __name: str) -> Any: ...
|
||||
def __setattr__(self, __name: str, __value: Any) -> None: ...
|
||||
def __delattr__(self, __name: str) -> None: ...
|
||||
ThreadError = _thread.error
|
||||
local = _thread._local
|
||||
|
||||
class Thread:
|
||||
name: str
|
||||
|
||||
Reference in New Issue
Block a user