From 2d6343f7b79246493151caaad2c439d6a5de6abf Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 3 Nov 2024 12:11:07 +0100 Subject: [PATCH] python312Packages.twilio: aiounittest is not supported oyn Python 3.12 --- .../python-modules/twilio/default.nix | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/twilio/default.nix b/pkgs/development/python-modules/twilio/default.nix index 7faf26909ea9..dce798f73b2a 100644 --- a/pkgs/development/python-modules/twilio/default.nix +++ b/pkgs/development/python-modules/twilio/default.nix @@ -1,7 +1,7 @@ { lib, - aiohttp, aiohttp-retry, + aiohttp, aiounittest, buildPythonPackage, cryptography, @@ -9,9 +9,10 @@ fetchFromGitHub, mock, multidict, - pyngrok, pyjwt, + pyngrok, pytestCheckHook, + pythonAtLeast, pythonOlder, pytz, requests, @@ -43,9 +44,6 @@ buildPythonPackage rec { requests ]; - # aiounittest is not supported on 3.12 - doCheck = pythonOlder "3.12"; - nativeCheckInputs = [ aiounittest cryptography @@ -61,11 +59,16 @@ buildPythonPackage rec { "test_set_user_agent_extensions" ]; - disabledTestPaths = [ - # Tests require API token - "tests/cluster/test_webhook.py" - "tests/cluster/test_cluster.py" - ]; + disabledTestPaths = + [ + # Tests require API token + "tests/cluster/test_webhook.py" + "tests/cluster/test_cluster.py" + ] + ++ lib.optionals (pythonAtLeast "3.11") [ + # aiounittest is not supported on Python 3.12 + "tests/unit/http/test_async_http_client.py" + ]; pythonImportsCheck = [ "twilio" ];