From 6a9b53e719a139c2d6b41cf265ed0990cf438192 Mon Sep 17 00:00:00 2001 From: Max Muoto Date: Thu, 11 Jul 2024 19:35:16 -0500 Subject: [PATCH] Update `_collections_abc` for 3.13 (#12309) --- stdlib/@tests/stubtest_allowlists/py313.txt | 2 -- stdlib/_collections_abc.pyi | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/stdlib/@tests/stubtest_allowlists/py313.txt b/stdlib/@tests/stubtest_allowlists/py313.txt index fee13e549..fac98abd5 100644 --- a/stdlib/@tests/stubtest_allowlists/py313.txt +++ b/stdlib/@tests/stubtest_allowlists/py313.txt @@ -3,8 +3,6 @@ # ========================= # TODO: triage these new errors -_collections_abc.dict_items.isdisjoint -_collections_abc.dict_keys.isdisjoint _ctypes.POINTER _ctypes.addressof _ctypes.alignment diff --git a/stdlib/_collections_abc.pyi b/stdlib/_collections_abc.pyi index e467d626e..127488ee3 100644 --- a/stdlib/_collections_abc.pyi +++ b/stdlib/_collections_abc.pyi @@ -70,6 +70,8 @@ _VT_co = TypeVar("_VT_co", covariant=True) # Value type covariant containers. @final class dict_keys(KeysView[_KT_co], Generic[_KT_co, _VT_co]): # undocumented def __eq__(self, value: object, /) -> bool: ... + if sys.version_info >= (3, 13): + def isdisjoint(self, other: Iterable[_KT_co], /) -> bool: ... if sys.version_info >= (3, 10): @property def mapping(self) -> MappingProxyType[_KT_co, _VT_co]: ... @@ -83,6 +85,8 @@ class dict_values(ValuesView[_VT_co], Generic[_KT_co, _VT_co]): # undocumented @final class dict_items(ItemsView[_KT_co, _VT_co]): # undocumented def __eq__(self, value: object, /) -> bool: ... + if sys.version_info >= (3, 13): + def isdisjoint(self, other: Iterable[tuple[_KT_co, _VT_co]], /) -> bool: ... if sys.version_info >= (3, 10): @property def mapping(self) -> MappingProxyType[_KT_co, _VT_co]: ...