Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.8] bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs [queue] (GH-13950) #15841

Merged
merged 1 commit into from
Sep 10, 2019
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions Doc/library/asyncio-queue.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ Queue
the queue is always known and can be returned by calling the
:meth:`qsize` method.

.. deprecated-removed:: 3.8 3.10
The *loop* parameter.


This class is :ref:`not thread safe <asyncio-multithreading>`.

.. attribute:: maxsize
Expand Down
4 changes: 4 additions & 0 deletions Lib/asyncio/queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import collections
import heapq
import warnings

from . import events
from . import locks
Expand Down Expand Up @@ -34,6 +35,9 @@ def __init__(self, maxsize=0, *, loop=None):
self._loop = events.get_event_loop()
else:
self._loop = loop
warnings.warn("The loop argument is deprecated since Python 3.8, "
"and scheduled for removal in Python 3.10.",
DeprecationWarning, stacklevel=2)
self._maxsize = maxsize

# Futures.
Expand Down