From 434e31369b68abf5b09f00b28cc897d8d61f1456 Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Thu, 20 Feb 2025 17:10:30 +0900 Subject: [PATCH] python3Packages.betterproto: fix build failure --- .../python-modules/betterproto/default.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/betterproto/default.nix b/pkgs/development/python-modules/betterproto/default.nix index 6eb47812b1df..e77dffda264b 100644 --- a/pkgs/development/python-modules/betterproto/default.nix +++ b/pkgs/development/python-modules/betterproto/default.nix @@ -19,6 +19,21 @@ grpcio-tools, }: +let + # using a older version of pytest-asyncio only for tests + # https://github.com/pytest-dev/pytest-asyncio/issues/928 + pytest-asyncio_23_8 = ( + pytest-asyncio.overridePythonAttrs (old: rec { + version = "0.23.8"; + src = fetchFromGitHub { + inherit (old.src) owner repo; + tag = "v${version}"; + hash = "sha256-kMv0crYuYHi1LF+VlXizZkG87kSL7xzsKq9tP9LgFVY="; + }; + }) + ); +in + buildPythonPackage rec { pname = "betterproto"; version = "2.0.0b6"; @@ -55,7 +70,7 @@ buildPythonPackage rec { nativeCheckInputs = [ grpcio-tools pydantic - pytest-asyncio + pytest-asyncio_23_8 pytest-mock pytest7CheckHook tomlkit