diff --git a/stdlib/@tests/stubtest_allowlists/py314.txt b/stdlib/@tests/stubtest_allowlists/py314.txt index 8f2a73dc6577..c7ab51479fea 100644 --- a/stdlib/@tests/stubtest_allowlists/py314.txt +++ b/stdlib/@tests/stubtest_allowlists/py314.txt @@ -2,16 +2,6 @@ # TODO: New errors in Python 3.14 that need to be fixed or moved below # ==================================================================== -multiprocessing.managers.BaseListProxy.clear -multiprocessing.managers.BaseListProxy.copy -multiprocessing.managers.DictProxy.__ior__ -multiprocessing.managers._BaseDictProxy.__ior__ -multiprocessing.managers._BaseDictProxy.__or__ -multiprocessing.managers._BaseDictProxy.__reversed__ -multiprocessing.managers._BaseDictProxy.__ror__ -multiprocessing.managers._BaseDictProxy.fromkeys -multiprocessing.process.BaseProcess.interrupt -multiprocessing.synchronize.SemLock.locked tarfile.TarFile.zstopen tkinter.Event.__class_getitem__ diff --git a/stdlib/multiprocessing/managers.pyi b/stdlib/multiprocessing/managers.pyi index b0ccac41b925..8e99fe6648e6 100644 --- a/stdlib/multiprocessing/managers.pyi +++ b/stdlib/multiprocessing/managers.pyi @@ -93,6 +93,12 @@ if sys.version_info >= (3, 13): def keys(self) -> list[_KT]: ... # type: ignore[override] def items(self) -> list[tuple[_KT, _VT]]: ... # type: ignore[override] def values(self) -> list[_VT]: ... # type: ignore[override] + if sys.version_info >= (3, 14): + def __ior__(self, value: Mapping[_KT, _VT], /) -> Self: ... # type: ignore[misc] + def __or__(self, value: Mapping[_KT, _VT], /) -> dict[_KT, _VT]: ... # type: ignore[misc] + def __reversed__(self) -> Iterator[_KT]: ... # type: ignore[misc] + def __ror__(self, value: Mapping[_KT, _VT], /) -> dict[_KT, _VT]: ... # type: ignore[misc] + def fromkeys(self, iterable: Iterable[_KT], value: _VT, /) -> dict[_KT, _VT]: ... # type: ignore[misc] class DictProxy(_BaseDictProxy[_KT, _VT]): def __class_getitem__(cls, args: Any, /) -> GenericAlias: ... @@ -197,6 +203,9 @@ class BaseListProxy(BaseProxy, MutableSequence[_T]): def sort(self: BaseListProxy[SupportsRichComparisonT], *, key: None = None, reverse: bool = ...) -> None: ... @overload def sort(self, *, key: Callable[[_T], SupportsRichComparison], reverse: bool = ...) -> None: ... + if sys.version_info >= (3, 14): + def clear(self) -> None: ... # type: ignore[misc] + def copy(self) -> list[_T]: ... # type: ignore[misc] class ListProxy(BaseListProxy[_T]): def __iadd__(self, value: Iterable[_T], /) -> Self: ... # type: ignore[override] diff --git a/stdlib/multiprocessing/process.pyi b/stdlib/multiprocessing/process.pyi index 4d129b27b0e8..85e7ad56740f 100644 --- a/stdlib/multiprocessing/process.pyi +++ b/stdlib/multiprocessing/process.pyi @@ -1,3 +1,4 @@ +import sys from collections.abc import Callable, Iterable, Mapping from typing import Any @@ -33,6 +34,8 @@ class BaseProcess: def pid(self) -> int | None: ... @property def sentinel(self) -> int: ... + if sys.version_info >= (3, 14): + def interrupt(self) -> None: ... def current_process() -> BaseProcess: ... def active_children() -> list[BaseProcess]: ... diff --git a/stdlib/multiprocessing/synchronize.pyi b/stdlib/multiprocessing/synchronize.pyi index a0d97baa0633..541e0b05dd8a 100644 --- a/stdlib/multiprocessing/synchronize.pyi +++ b/stdlib/multiprocessing/synchronize.pyi @@ -1,3 +1,4 @@ +import sys import threading from collections.abc import Callable from multiprocessing.context import BaseContext @@ -45,6 +46,8 @@ class SemLock: # These methods are copied from the wrapped _multiprocessing.SemLock object def acquire(self, block: bool = True, timeout: float | None = None) -> bool: ... def release(self) -> None: ... + if sys.version_info >= (3, 14): + def locked(self) -> bool: ... class Lock(SemLock): def __init__(self, *, ctx: BaseContext) -> None: ...