From fe32cf5c0e007f1bfc7a72c69164ec88689cb878 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 2 May 2024 23:47:56 +0200 Subject: [PATCH] python312Packages.logilab-common: fix test failure on Python 3.12 --- pkgs/development/python-modules/logilab/common.nix | 6 ++++++ 1 file changed, 6 insertions(+) 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 ];