From f1dfd96632a5e7d83abd8eee3771159f7c1b0a43 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 23 May 2024 11:53:38 +0200 Subject: [PATCH] python312Packages.aiosasl: fix broken tests on Python 3.12 https://github.com/horazont/aiosasl/issues/28 --- pkgs/development/python-modules/aiosasl/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/aiosasl/default.nix b/pkgs/development/python-modules/aiosasl/default.nix index 81f96c4d1b1b..fe977cc1bbec 100644 --- a/pkgs/development/python-modules/aiosasl/default.nix +++ b/pkgs/development/python-modules/aiosasl/default.nix @@ -5,13 +5,16 @@ fetchpatch, pyopenssl, pytestCheckHook, + pythonOlder, + setuptools, }: buildPythonPackage rec { pname = "aiosasl"; version = "0.5.0"; + pyproject = true; - format = "setuptools"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "horazont"; @@ -28,6 +31,14 @@ buildPythonPackage rec { }) ]; + postPatch = '' + # https://github.com/horazont/aiosasl/issues/28 + substituteInPlace tests/test_aiosasl.py \ + --replace-fail "assertRaisesRegexp" "assertRaisesRegex" + ''; + + build-system = [ setuptools ]; + nativeCheckInputs = [ pyopenssl pytestCheckHook