Skip to content

Commit 5c7d51f

Browse files
authored
add missing attributes of _thread_local._localimpl (#13143)
add missing attributes of _thread_local._localimpl
1 parent 00c0c8d commit 5c7d51f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

stdlib/@tests/stubtest_allowlists/common.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ xml.sax.expatreader
6666
# TODO: Module members that exist at runtime, but are missing from stubs
6767
# ==========
6868
_thread.RLock
69-
_threading_local._localimpl.localargs
70-
_threading_local._localimpl.locallock
7169
ctypes.ARRAY
7270
ctypes.SetPointerType
7371
ctypes.c_voidp

stdlib/_threading_local.pyi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from threading import RLock
12
from typing import Any
23
from typing_extensions import Self, TypeAlias
34
from weakref import ReferenceType
@@ -8,6 +9,9 @@ _LocalDict: TypeAlias = dict[Any, Any]
89
class _localimpl:
910
key: str
1011
dicts: dict[int, tuple[ReferenceType[Any], _LocalDict]]
12+
# Keep localargs in sync with the *args, **kwargs annotation on local.__new__
13+
localargs: tuple[list[Any], dict[str, Any]]
14+
locallock: RLock
1115
def get_dict(self) -> _LocalDict: ...
1216
def create_dict(self) -> _LocalDict: ...
1317

0 commit comments

Comments
 (0)