about summary refs log tree commit diff
path: root/pkgs/development/python-modules/webtest/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/webtest/default.nix')
-rw-r--r--pkgs/development/python-modules/webtest/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/webtest/default.nix b/pkgs/development/python-modules/webtest/default.nix
index ce34b045fd67..52d48505df47 100644
--- a/pkgs/development/python-modules/webtest/default.nix
+++ b/pkgs/development/python-modules/webtest/default.nix
@@ -2,6 +2,7 @@
 , beautifulsoup4
 , buildPythonPackage
 , fetchPypi
+, fetchpatch
 , pastedeploy
 , pyquery
 , pytestCheckHook
@@ -25,6 +26,15 @@ buildPythonPackage rec {
     hash = "sha256-VL2WlyWDjZhhqfon+Nlx950nXZSuJV9cUB9Tu22ZKes=";
   };
 
+  patches = [
+    (fetchpatch {
+      # Replace deprecated unittest aliases for Python 3.12
+      name = "webtest-python312-compat.patch";
+      url = "https://github.com/Pylons/webtest/commit/d82ec5bd2cf3c7109a1d49ad9fa802ae1eae1763.patch";
+      hash = "sha256-hSwxAxAI3Eo28I8S+r2k/hFG8TlzrVYup3MuTsE+xXk=";
+    })
+  ];
+
   propagatedBuildInputs = [
     beautifulsoup4
     six