Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions stdlib/queue.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ _T = TypeVar("_T")
class Empty(Exception): ...
class Full(Exception): ...

if sys.version_info >= (3, 13):
class ShutDown(Exception): ...

class Queue(Generic[_T]):
maxsize: int

Expand All @@ -20,6 +23,8 @@ class Queue(Generic[_T]):
not_full: Condition # undocumented
all_tasks_done: Condition # undocumented
unfinished_tasks: int # undocumented
if sys.version_info >= (3, 13):
is_shutdown: bool # undocumented
# Despite the fact that `queue` has `deque` type,
# we treat it as `Any` to allow different implementations in subtypes.
queue: Any # undocumented
Expand All @@ -29,6 +34,9 @@ class Queue(Generic[_T]):
def full(self) -> bool: ...
def get(self, block: bool = True, timeout: float | None = None) -> _T: ...
def get_nowait(self) -> _T: ...
if sys.version_info >= (3, 13):
def shutdown(self, immediate: bool = False): ...
Comment thread
JelleZijlstra marked this conversation as resolved.
Outdated

def _get(self) -> _T: ...
def put(self, item: _T, block: bool = True, timeout: float | None = None) -> None: ...
def put_nowait(self, item: _T) -> None: ...
Expand Down