Skip to content

Commit

Permalink
add missing attributes of _thread_local._localimpl (python#13143)
Browse files Browse the repository at this point in the history
add missing attributes of _thread_local._localimpl
  • Loading branch information
tungol authored Nov 28, 2024
1 parent 00c0c8d commit 5c7d51f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions stdlib/@tests/stubtest_allowlists/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions stdlib/_threading_local.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from threading import RLock
from typing import Any
from typing_extensions import Self, TypeAlias
from weakref import ReferenceType
Expand All @@ -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: ...

Expand Down

0 comments on commit 5c7d51f

Please sign in to comment.