Skip to content

Asyncio Queue maxsize parameter is not being used #125949

@V-H-R-Oliveira

Description

@V-H-R-Oliveira

Bug report

Bug description:

Hello, in the Asyncio Queue class the maxsize argument is not being used, so it seems to always create an unbounded queue.

If it is a bug, the solution is very simple: self._queue = collections.deque(maxsize)

Current implementation:
https://github.com/python/cpython/blob/e68d4b08ff13a06a2c2877f63bf856e6bf3c2e77/Lib/asyncio/queues.py#L33C1-L61C42

CPython versions tested on:

3.12

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-asynciotype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions