python311Packages.mechanize: fix compat with Python 3.11+

Closes: #305577
This commit is contained in:
Martin Weinelt 2024-04-21 13:19:51 +02:00
parent 3c35c90c20
commit cf99dec338
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
1 changed files with 9 additions and 0 deletions

View File

@ -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
];