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
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
import collections
import heapq
+import warnings
from . import events
from . import locks
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.