bpo-36373: Fix deprecation warnings (GH-15889)
https://bugs.python.org/issue36373
diff --git a/Lib/asyncio/locks.py b/Lib/asyncio/locks.py
index f63d4ce..d94daeb 100644
--- a/Lib/asyncio/locks.py
+++ b/Lib/asyncio/locks.py
@@ -332,7 +332,7 @@
DeprecationWarning, stacklevel=2)
if lock is None:
- lock = Lock(loop=self._loop)
+ lock = Lock(loop=loop)
elif lock._loop is not self._loop:
raise ValueError("loop argument must agree with lock")
diff --git a/Lib/asyncio/queues.py b/Lib/asyncio/queues.py
index c96b4a0..390ae9a 100644
--- a/Lib/asyncio/queues.py
+++ b/Lib/asyncio/queues.py
@@ -45,7 +45,7 @@
# Futures.
self._putters = collections.deque()
self._unfinished_tasks = 0
- self._finished = locks.Event(loop=self._loop)
+ self._finished = locks.Event(loop=loop)
self._finished.set()
self._init(maxsize)