add missing attributes of _thread_local._localimpl (#13143)

add missing attributes of _thread_local._localimpl
This commit is contained in:
Stephen Morton
2024-11-28 07:10:37 -08:00
committed by GitHub
parent 00c0c8d984
commit 5c7d51f3b8
2 changed files with 4 additions and 2 deletions

View File

@@ -66,8 +66,6 @@ xml.sax.expatreader
# TODO: Module members that exist at runtime, but are missing from stubs
# ==========
_thread.RLock
_threading_local._localimpl.localargs
_threading_local._localimpl.locallock
ctypes.ARRAY
ctypes.SetPointerType
ctypes.c_voidp

View File

@@ -1,3 +1,4 @@
from threading import RLock
from typing import Any
from typing_extensions import Self, TypeAlias
from weakref import ReferenceType
@@ -8,6 +9,9 @@ _LocalDict: TypeAlias = dict[Any, Any]
class _localimpl:
key: str
dicts: dict[int, tuple[ReferenceType[Any], _LocalDict]]
# Keep localargs in sync with the *args, **kwargs annotation on local.__new__
localargs: tuple[list[Any], dict[str, Any]]
locallock: RLock
def get_dict(self) -> _LocalDict: ...
def create_dict(self) -> _LocalDict: ...