From 267b71d17bbbf9b6d98d397fd5231ee19278b677 Mon Sep 17 00:00:00 2001 From: Maxwell Muoto <41130755+max-muoto@users.noreply.github.com> Date: Sun, 30 Jun 2024 13:38:35 -0500 Subject: [PATCH 1/4] Add _interpqueues for 3.13 --- stdlib/_interpqueues.pyi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 stdlib/_interpqueues.pyi diff --git a/stdlib/_interpqueues.pyi b/stdlib/_interpqueues.pyi new file mode 100644 index 000000000000..dec11e039658 --- /dev/null +++ b/stdlib/_interpqueues.pyi @@ -0,0 +1,16 @@ +from typing import SupportsIndex + +class QueueError(RuntimeError): ... +class QueueNotFoundError(QueueError): ... + +def bind(qid: SupportsIndex) -> None: ... +def create(maxsize: SupportsIndex, fmt: SupportsIndex) -> int: ... +def destroy(qid: SupportsIndex) -> None: ... +def get(qid: SupportsIndex) -> tuple[object, int]: ... +def get_count(qid: SupportsIndex) -> int: ... +def get_maxsize(qid: SupportsIndex) -> int: ... +def get_queue_defaults(qid: SupportsIndex) -> tuple[int]: ... +def is_full(qid: SupportsIndex) -> bool: ... +def list_all() -> list[tuple[int, int]]: ... +def put(qid: SupportsIndex, obj: object, fmt: SupportsIndex) -> None: ... +def release(qid: SupportsIndex) -> None: ... From 78057cfadc0e6c6e583748aa6451a6a860f72d8e Mon Sep 17 00:00:00 2001 From: Maxwell Muoto <41130755+max-muoto@users.noreply.github.com> Date: Sun, 30 Jun 2024 13:40:29 -0500 Subject: [PATCH 2/4] Add to VERSIONS --- stdlib/VERSIONS | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/VERSIONS b/stdlib/VERSIONS index 89754f65f3fa..e98f60f86890 100644 --- a/stdlib/VERSIONS +++ b/stdlib/VERSIONS @@ -35,6 +35,7 @@ _dummy_threading: 3.0-3.8 _heapq: 3.0- _imp: 3.0- _interpchannels: 3.13- +_interpqueues: 3.13- _json: 3.0- _locale: 3.0- _lsprof: 3.0- From a77bcf88a8fe1b4e510dc065068621080cd1d17e Mon Sep 17 00:00:00 2001 From: Maxwell Muoto <41130755+max-muoto@users.noreply.github.com> Date: Wed, 3 Jul 2024 23:01:44 -0500 Subject: [PATCH 3/4] Address comment --- stdlib/_interpqueues.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/_interpqueues.pyi b/stdlib/_interpqueues.pyi index dec11e039658..e0b040420710 100644 --- a/stdlib/_interpqueues.pyi +++ b/stdlib/_interpqueues.pyi @@ -1,4 +1,4 @@ -from typing import SupportsIndex +from typing import Any, SupportsIndex class QueueError(RuntimeError): ... class QueueNotFoundError(QueueError): ... @@ -6,7 +6,7 @@ class QueueNotFoundError(QueueError): ... def bind(qid: SupportsIndex) -> None: ... def create(maxsize: SupportsIndex, fmt: SupportsIndex) -> int: ... def destroy(qid: SupportsIndex) -> None: ... -def get(qid: SupportsIndex) -> tuple[object, int]: ... +def get(qid: SupportsIndex) -> tuple[Any, int]: ... def get_count(qid: SupportsIndex) -> int: ... def get_maxsize(qid: SupportsIndex) -> int: ... def get_queue_defaults(qid: SupportsIndex) -> tuple[int]: ... From 98a79ac82df0ffb99eef344f2d4dceacba533b0f Mon Sep 17 00:00:00 2001 From: Maxwell Muoto <41130755+max-muoto@users.noreply.github.com> Date: Thu, 4 Jul 2024 11:22:42 -0500 Subject: [PATCH 4/4] Move to Any --- stdlib/_interpqueues.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/_interpqueues.pyi b/stdlib/_interpqueues.pyi index e0b040420710..db5e4cff5068 100644 --- a/stdlib/_interpqueues.pyi +++ b/stdlib/_interpqueues.pyi @@ -12,5 +12,5 @@ def get_maxsize(qid: SupportsIndex) -> int: ... def get_queue_defaults(qid: SupportsIndex) -> tuple[int]: ... def is_full(qid: SupportsIndex) -> bool: ... def list_all() -> list[tuple[int, int]]: ... -def put(qid: SupportsIndex, obj: object, fmt: SupportsIndex) -> None: ... +def put(qid: SupportsIndex, obj: Any, fmt: SupportsIndex) -> None: ... def release(qid: SupportsIndex) -> None: ...