From 164dddf5f8c9c6b93f32c9f79b4301fc804576e9 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Sun, 10 Oct 2021 09:25:14 -0700 Subject: bpo-45416: Fix use of asyncio.Condition() with explicit Lock objects (GH-28850) Co-authored-by: Serhiy Storchaka (cherry picked from commit 1a7892414e654aa5c99efa31db767baba7f4a424) Co-authored-by: Joongi Kim --- 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 a7453fb1c7..4fef64e392 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.1