mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-36373: Fix deprecation warnings (GH-15889)
https://bugs.python.org/issue36373
This commit is contained in:
parent
efd5741ae9
commit
7264e92b71
5 changed files with 12 additions and 12 deletions
|
@ -332,7 +332,7 @@ class Condition(_ContextManagerMixin):
|
|||
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")
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ class Queue:
|
|||
# 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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue