Skip to content
Permalink
Browse files

bpo-36373: Deprecate explicit loop parameter in all public asyncio AP…

…Is [queue] (GH-13950)

This PR deprecate explicit loop parameters in all public asyncio APIs

This issues is split to be easier to review.

fourth step: queue.py

https://bugs.python.org/issue36373
(cherry picked from commit 9008be3)

Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
  • Loading branch information...
miss-islington and eamanu committed Sep 10, 2019
1 parent bb8fc8b commit 55daf1a56163e0673654712bb92ce47a9b6f7be3
Showing with 8 additions and 0 deletions.
  1. +4 −0 Doc/library/asyncio-queue.rst
  2. +4 −0 Lib/asyncio/queues.py
@@ -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
@@ -2,6 +2,7 @@

import collections
import heapq
import warnings

from . import events
from . import locks
@@ -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.

0 comments on commit 55daf1a

Please sign in to comment.
You can’t perform that action at this time.