From 1a7892414e654aa5c99efa31db767baba7f4a424 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Mon, 11 Oct 2021 01:01:41 +0900 Subject: bpo-45416: Fix use of asyncio.Condition() with explicit Lock objects (GH-28850) Co-authored-by: Serhiy Storchaka --- Lib/asyncio/locks.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'Lib/asyncio/locks.py') diff --git a/Lib/asyncio/locks.py b/Lib/asyncio/locks.py index a7453fb1c77..4fef64e3921 100644 --- a/Lib/asyncio/locks.py +++ b/Lib/asyncio/locks.py @@ -230,8 +230,6 @@ class Condition(_ContextManagerMixin, mixins._LoopBoundMixin): super().__init__(loop=loop) if lock is None: lock = Lock() - elif lock._loop is not self._get_loop(): - raise ValueError("loop argument must agree with lock") self._lock = lock # Export the lock's locked(), acquire() and release() methods. -- cgit v1.2.3