From 03878d732af5e3be4712f63973783761cab3893a Mon Sep 17 00:00:00 2001 From: Rebecca Chen Date: Sat, 16 Mar 2019 14:11:48 -0700 Subject: [PATCH] Add attribute queue.Queue.queue. (#2870) --- stdlib/2/Queue.pyi | 14 ++++++++------ stdlib/3/queue.pyi | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/stdlib/2/Queue.pyi b/stdlib/2/Queue.pyi index 831b96cc4..11b01ed1c 100644 --- a/stdlib/2/Queue.pyi +++ b/stdlib/2/Queue.pyi @@ -1,5 +1,6 @@ # Stubs for Queue (Python 2) +from collections import deque from typing import Any, TypeVar, Generic, Optional _T = TypeVar('_T') @@ -8,12 +9,13 @@ class Empty(Exception): ... class Full(Exception): ... class Queue(Generic[_T]): - maxsize = ... # type: Any - mutex = ... # type: Any - not_empty = ... # type: Any - not_full = ... # type: Any - all_tasks_done = ... # type: Any - unfinished_tasks = ... # type: Any + maxsize: Any + mutex: Any + not_empty: Any + not_full: Any + all_tasks_done: Any + unfinished_tasks: Any + queue: deque # undocumented def __init__(self, maxsize: int = ...) -> None: ... def task_done(self) -> None: ... def join(self) -> None: ... diff --git a/stdlib/3/queue.pyi b/stdlib/3/queue.pyi index 1eb7360fa..987452438 100644 --- a/stdlib/3/queue.pyi +++ b/stdlib/3/queue.pyi @@ -2,6 +2,7 @@ # NOTE: These are incomplete! +from collections import deque from typing import Any, TypeVar, Generic, Optional _T = TypeVar('_T') @@ -10,7 +11,8 @@ class Empty(Exception): ... class Full(Exception): ... class Queue(Generic[_T]): - maxsize = ... # type: int + maxsize: int + queue: deque # undocumented def __init__(self, maxsize: int = ...) -> None: ... def _init(self, maxsize: int) -> None: ... def empty(self) -> bool: ...