about summary refs log tree commit diff
path: root/pkgs/development/python-modules/mechanize/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/mechanize/default.nix')
-rw-r--r--pkgs/development/python-modules/mechanize/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/mechanize/default.nix b/pkgs/development/python-modules/mechanize/default.nix
index 0f89f3f42525a..3724fa64d06e7 100644
--- a/pkgs/development/python-modules/mechanize/default.nix
+++ b/pkgs/development/python-modules/mechanize/default.nix
@@ -1,6 +1,7 @@
 { lib
 , buildPythonPackage
 , fetchPypi
+, fetchpatch2
 , html5lib
 , pytestCheckHook
 , pythonOlder
@@ -19,6 +20,14 @@ buildPythonPackage rec {
     hash = "sha256-aaXtsJYvkh6LEINzaMIkLYrQSfC5H/aZzn9gG/xDFSE=";
   };
 
+  patches = [
+    (fetchpatch2 {
+      # python 3.11+ compat
+      url = "https://github.com/python-mechanize/mechanize/commit/1324b09b661aaac7d4cdc7e1e9d49e1c3851db2c.patch";
+      hash = "sha256-d0Zuz6m2Uv8pnR8TC0L+AStS82rPPTpQrrjkCZnJliE=";
+    })
+  ];
+
   nativeBuildInputs = [
     setuptools
   ];