diff --git a/pkgs/development/python-modules/logilab/common.nix b/pkgs/development/python-modules/logilab/common.nix index 57c65a703824..cd700626cdd8 100644 --- a/pkgs/development/python-modules/logilab/common.nix +++ b/pkgs/development/python-modules/logilab/common.nix @@ -4,6 +4,7 @@ , importlib-metadata , mypy-extensions , pytestCheckHook +, pythonAtLeast , pythonOlder , pytz , setuptools @@ -22,6 +23,11 @@ buildPythonPackage rec { hash = "sha256-ojvR2k3Wpj5Ej0OS57I4aFX/cGFVeL/PmT7riCTelws="; }; + postPatch = lib.optionals (pythonAtLeast "3.12") '' + substituteInPlace logilab/common/testlib.py \ + --replace-fail "_TextTestResult" "TextTestResult" + ''; + build-system = [ setuptools ];