diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-09-10 12:50:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-10 12:50:14 (GMT) |
commit | 55daf1a56163e0673654712bb92ce47a9b6f7be3 (patch) | |
tree | 5e8f4a8bbf17eaae156b2470a2c30c8769934604 /Lib/asyncio | |
parent | bb8fc8bd309419c159b632068dff73c3c76d478c (diff) | |
download | cpython-55daf1a56163e0673654712bb92ce47a9b6f7be3.zip cpython-55daf1a56163e0673654712bb92ce47a9b6f7be3.tar.gz cpython-55daf1a56163e0673654712bb92ce47a9b6f7be3.tar.bz2 |
bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs [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 9008be303a89bfab8c3314c6a42330b5523adc8b)
Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/queues.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/asyncio/queues.py b/Lib/asyncio/queues.py index 2a8d3e7..c96b4a0 100644 --- a/Lib/asyncio/queues.py +++ b/Lib/asyncio/queues.py @@ -2,6 +2,7 @@ __all__ = ('Queue', 'PriorityQueue', 'LifoQueue', 'QueueFull', 'QueueEmpty') import collections import heapq +import warnings from . import events from . import locks @@ -34,6 +35,9 @@ class Queue: 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. |