From b9902985b710f6cc8d9e72174772deff61d20a44 Mon Sep 17 00:00:00 2001 From: Maxwell Muoto <41130755+max-muoto@users.noreply.github.com> Date: Tue, 9 Jul 2024 19:36:07 -0500 Subject: [PATCH 1/4] Update collections_abc --- stdlib/@tests/stubtest_allowlists/py313.txt | 2 -- stdlib/_collections_abc.pyi | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/stdlib/@tests/stubtest_allowlists/py313.txt b/stdlib/@tests/stubtest_allowlists/py313.txt index 2f3db297afee..2336f26d3e5a 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 e467d626e8a8..a60f91352ae4 100644 --- a/stdlib/_collections_abc.pyi +++ b/stdlib/_collections_abc.pyi @@ -3,6 +3,7 @@ from abc import abstractmethod from types import MappingProxyType from typing import ( # noqa: Y022,Y038,Y057 AbstractSet as Set, + Any, AsyncGenerator as AsyncGenerator, AsyncIterable as AsyncIterable, AsyncIterator as AsyncIterator, @@ -70,6 +71,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[Any], /) -> bool: ... if sys.version_info >= (3, 10): @property def mapping(self) -> MappingProxyType[_KT_co, _VT_co]: ... @@ -83,6 +86,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[Any], /) -> bool: ... if sys.version_info >= (3, 10): @property def mapping(self) -> MappingProxyType[_KT_co, _VT_co]: ... From ed0d22d222c1c5b2e1d675bd694769e2d8c5ff97 Mon Sep 17 00:00:00 2001 From: Max Muoto Date: Thu, 11 Jul 2024 19:16:35 -0500 Subject: [PATCH 2/4] Update stdlib/_collections_abc.pyi Co-authored-by: Jelle Zijlstra --- stdlib/_collections_abc.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/_collections_abc.pyi b/stdlib/_collections_abc.pyi index a60f91352ae4..aed81106be2c 100644 --- a/stdlib/_collections_abc.pyi +++ b/stdlib/_collections_abc.pyi @@ -72,7 +72,7 @@ _VT_co = TypeVar("_VT_co", covariant=True) # Value type covariant containers. 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[Any], /) -> bool: ... + def isdisjoint(self, other: Iterable[_KT_co], /) -> bool: ... if sys.version_info >= (3, 10): @property def mapping(self) -> MappingProxyType[_KT_co, _VT_co]: ... From 1eb7cf26a959b10670928c190d4e36cc7915627f Mon Sep 17 00:00:00 2001 From: Max Muoto Date: Thu, 11 Jul 2024 19:16:39 -0500 Subject: [PATCH 3/4] Update stdlib/_collections_abc.pyi Co-authored-by: Jelle Zijlstra --- stdlib/_collections_abc.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/_collections_abc.pyi b/stdlib/_collections_abc.pyi index aed81106be2c..9cfda5cad750 100644 --- a/stdlib/_collections_abc.pyi +++ b/stdlib/_collections_abc.pyi @@ -87,7 +87,7 @@ class dict_values(ValuesView[_VT_co], Generic[_KT_co, _VT_co]): # undocumented 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[Any], /) -> bool: ... + 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]: ... From 07256b35c36eae64305fb16bef9dee975026a544 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 00:23:00 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stdlib/_collections_abc.pyi | 1 - 1 file changed, 1 deletion(-) diff --git a/stdlib/_collections_abc.pyi b/stdlib/_collections_abc.pyi index 9cfda5cad750..127488ee382c 100644 --- a/stdlib/_collections_abc.pyi +++ b/stdlib/_collections_abc.pyi @@ -3,7 +3,6 @@ from abc import abstractmethod from types import MappingProxyType from typing import ( # noqa: Y022,Y038,Y057 AbstractSet as Set, - Any, AsyncGenerator as AsyncGenerator, AsyncIterable as AsyncIterable, AsyncIterator as AsyncIterator,