diff --git a/stdlib/@tests/stubtest_allowlists/py314.txt b/stdlib/@tests/stubtest_allowlists/py314.txt index db076fb76..d3b10ea71 100644 --- a/stdlib/@tests/stubtest_allowlists/py314.txt +++ b/stdlib/@tests/stubtest_allowlists/py314.txt @@ -4,8 +4,6 @@ _asyncio.all_tasks _imp.pyc_magic_number_token -_thread.RLock.locked -_thread.set_name asyncio.eager_task_factory asyncio.tasks.eager_task_factory compression.gzip.GzipFile.readinto diff --git a/stdlib/_thread.pyi b/stdlib/_thread.pyi index 378ac2423..9cfbe55b4 100644 --- a/stdlib/_thread.pyi +++ b/stdlib/_thread.pyi @@ -18,6 +18,8 @@ class RLock: def release(self) -> None: ... __enter__ = acquire def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ... + if sys.version_info >= (3, 14): + def locked(self) -> bool: ... if sys.version_info >= (3, 13): @final @@ -105,6 +107,9 @@ _excepthook: Callable[[_ExceptHookArgs], Any] if sys.version_info >= (3, 12): def daemon_threads_allowed() -> bool: ... +if sys.version_info >= (3, 14): + def set_name(name: str) -> None: ... + class _local: def __getattribute__(self, name: str, /) -> Any: ... def __setattr__(self, name: str, value: Any, /) -> None: ...