about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilly <jemand771@gmx.net>2024-05-12 21:53:13 +0200
committerWilly <jemand771@gmx.net>2024-05-12 21:53:13 +0200
commitb11a9b32caf659032a59f9ad7f32fbfd11182f15 (patch)
treeb8879d9fa7165e0197574d1cab7e419a72318f12
parente238fe963042e6ba3552f907c31a50b5eddff540 (diff)
python312Packages.chai: fix python 3.12 build
assertXYZ methods with the "s" suffix were removed in python 3.12, patch until fixed upstream
-rw-r--r--pkgs/development/python-modules/chai/default.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/chai/default.nix b/pkgs/development/python-modules/chai/default.nix
index 6146ec692c75f..7fb8e6d3489f3 100644
--- a/pkgs/development/python-modules/chai/default.nix
+++ b/pkgs/development/python-modules/chai/default.nix
@@ -10,6 +10,14 @@ buildPythonPackage rec {
     sha256 = "ff8d2b6855f660cd23cd5ec79bd10264d39f24f6235773331b48e7fcd637d6cc";
   };
 
+  postPatch = ''
+    # python 3.12 compatibility
+    substituteInPlace tests/*.py \
+      --replace "assertEquals" "assertEqual" \
+      --replace "assertNotEquals" "assertNotEqual" \
+      --replace "assert_equals" "assert_equal"
+  '';
+
   meta = with lib; {
     description = "Mocking, stubbing and spying framework for python";
   };