Skip to content

Commit 96fdb1a

Browse files
committed
[multiprocessing] Update to 3.14
Source: python/cpython#103133
1 parent 1b3cec1 commit 96fdb1a

File tree

2 files changed

+25
-15
lines changed

2 files changed

+25
-15
lines changed

stdlib/@tests/stubtest_allowlists/py314.txt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
# ====================================================================
2-
# TODO: New errors in Python 3.14 that need to be fixed or moved below
3-
# ====================================================================
4-
5-
multiprocessing.managers.BaseListProxy.clear
6-
# inspect.signature gives the wrong signature
7-
multiprocessing.managers.BaseListProxy.copy
8-
multiprocessing.managers.DictProxy.__ior__
9-
multiprocessing.managers._BaseDictProxy.__ior__
10-
multiprocessing.managers._BaseDictProxy.__or__
11-
multiprocessing.managers._BaseDictProxy.__reversed__
12-
multiprocessing.managers._BaseDictProxy.__ror__
13-
multiprocessing.managers._BaseDictProxy.fromkeys
14-
15-
161
# =========================
172
# New errors in Python 3.14
183
# =========================

stdlib/multiprocessing/managers.pyi

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ from .util import Finalize as _Finalize
2626
__all__ = ["BaseManager", "SyncManager", "BaseProxy", "Token", "SharedMemoryManager"]
2727

2828
_T = TypeVar("_T")
29+
_T1 = TypeVar("_T1")
30+
_T2 = TypeVar("_T2")
2931
_KT = TypeVar("_KT")
3032
_VT = TypeVar("_VT")
3133
_S = TypeVar("_S")
@@ -94,6 +96,27 @@ if sys.version_info >= (3, 13):
9496
def keys(self) -> list[_KT]: ... # type: ignore[override]
9597
def items(self) -> list[tuple[_KT, _VT]]: ... # type: ignore[override]
9698
def values(self) -> list[_VT]: ... # type: ignore[override]
99+
if sys.version_info >= (3, 14):
100+
# Next methods are copied from builtins.dict
101+
@classmethod
102+
@overload
103+
def fromkeys(cls, iterable: Iterable[_T], value: None = None, /) -> dict[_T, Any | None]: ...
104+
@classmethod
105+
@overload
106+
def fromkeys(cls, iterable: Iterable[_T], value: _S, /) -> dict[_T, _S]: ...
107+
def __reversed__(self) -> Iterator[_KT]: ...
108+
@overload
109+
def __or__(self, value: dict[_KT, _VT], /) -> dict[_KT, _VT]: ...
110+
@overload
111+
def __or__(self, value: dict[_T1, _T2], /) -> dict[_KT | _T1, _VT | _T2]: ...
112+
@overload
113+
def __ror__(self, value: dict[_KT, _VT], /) -> dict[_KT, _VT]: ...
114+
@overload
115+
def __ror__(self, value: dict[_T1, _T2], /) -> dict[_KT | _T1, _VT | _T2]: ...
116+
@overload # type: ignore[misc]
117+
def __ior__(self, value: SupportsKeysAndGetItem[_KT, _VT], /) -> Self: ...
118+
@overload
119+
def __ior__(self, value: Iterable[tuple[_KT, _VT]], /) -> Self: ...
97120

98121
class DictProxy(_BaseDictProxy[_KT, _VT]):
99122
def __class_getitem__(cls, args: Any, /) -> GenericAlias: ...
@@ -193,6 +216,8 @@ class BaseListProxy(BaseProxy, MutableSequence[_T]):
193216
def insert(self, index: SupportsIndex, object: _T, /) -> None: ...
194217
def remove(self, value: _T, /) -> None: ...
195218
if sys.version_info >= (3, 14):
219+
# Next methods are copied from builtins.list
220+
def clear(self) -> None: ...
196221
def copy(self) -> list[_T]: ...
197222
# Use BaseListProxy[SupportsRichComparisonT] for the first overload rather than [SupportsRichComparison]
198223
# to work around invariance

0 commit comments

Comments
 (0)