diff --git a/stdlib/@tests/stubtest_allowlists/common.txt b/stdlib/@tests/stubtest_allowlists/common.txt index 9b2da7725..219f530df 100644 --- a/stdlib/@tests/stubtest_allowlists/common.txt +++ b/stdlib/@tests/stubtest_allowlists/common.txt @@ -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 diff --git a/stdlib/_threading_local.pyi b/stdlib/_threading_local.pyi index f9ac94227..07a825f0d 100644 --- a/stdlib/_threading_local.pyi +++ b/stdlib/_threading_local.pyi @@ -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: ...