diff --git a/pkgs/development/python-modules/aiorwlock/default.nix b/pkgs/development/python-modules/aiorwlock/default.nix index 9139bd1de4ef..4266a374b7ee 100644 --- a/pkgs/development/python-modules/aiorwlock/default.nix +++ b/pkgs/development/python-modules/aiorwlock/default.nix @@ -5,6 +5,7 @@ pytest-asyncio, pytestCheckHook, poetry-core, + fetchpatch, }: buildPythonPackage rec { @@ -21,6 +22,15 @@ buildPythonPackage rec { build-system = [ poetry-core ]; + patches = [ + # Fix cross-event-loop race condition in lock acquisition + # https://github.com/aio-libs/aiorwlock/pull/503 + (fetchpatch { + url = "https://github.com/aio-libs/aiorwlock/commit/05608d401e4a68c69c6b9f421dd20535a9dbe523.patch?full_index=1"; + hash = "sha256-97c6Li6nq7ViNvUIdPL8f/ATOSsmiAMaJeBFj+jPJcM="; + }) + ]; + nativeCheckInputs = [ pytest-asyncio pytestCheckHook