Skip to content

In asyncio.Queue documentation, the raise of QueueShutDown exception is missing in put_nowait and get_nowaitmethods #152614

Closed

Description

@YvesDup

Documentation

The put_nowait method can raise a QueueShutDownexception, see:

def put_nowait(self, item):
"""Put an item into the queue without blocking.
If no free slot is immediately available, raise QueueFull.
Raises QueueShutDown if the queue has been shut down.
"""
if self._is_shutdown:
raise QueueShutDown
if self.full():

But this raise is missing in the put_nowait method entry of the documentation

.. method:: put_nowait(item)
Put an item into the queue without blocking.
If no free slot is immediately available, raise :exc:`QueueFull`.

The same problem exists with the get_nowait method.

Moreover, this 2 methods are not referenced in the QueueShutDown exception section.

.. exception:: QueueShutDown
Exception raised when :meth:`~Queue.put` or :meth:`~Queue.get` is
called on a queue which has been shut down.

I can submit a PR, quickly.

Linked PRs

Activity

  1. Bat-Script commented on Jun 29, 2026

    @Bat-Script
  2. added a commit that references this issue on Jul 11, 2026
  3. moved this from Todo to Done in asyncioon Jul 11, 2026
  4. added 3 commits that reference this issue on Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions