diff --git a/pkgs/development/python-modules/aiobotocore/default.nix b/pkgs/development/python-modules/aiobotocore/default.nix index 15eeb18989cc..21883ceab8aa 100644 --- a/pkgs/development/python-modules/aiobotocore/default.nix +++ b/pkgs/development/python-modules/aiobotocore/default.nix @@ -13,6 +13,7 @@ , setuptools , pytest-asyncio , pytestCheckHook +, pythonAtLeast , pythonOlder , wrapt }: @@ -96,6 +97,10 @@ buildPythonPackage rec { "test_required_config_not_set" "test_sso_cred_fetcher_raises_helpful_message_on_unauthorized_exception" "test_sso_credential_fetcher_can_fetch_credentials" + ] ++ lib.optionals (pythonAtLeast "3.12.") [ + # AttributeError: 'called_with' is not a valid assertion. Use a spec for the mock if 'called_with' is meant to be an attribute. + "test_max_rate_updated_on_success_response" + "test_max_rate_cant_exceed_20_percent_max" ]; __darwinAllowLocalNetworking = true; diff --git a/pkgs/development/python-modules/arcam-fmj/default.nix b/pkgs/development/python-modules/arcam-fmj/default.nix index df5bcc40836f..7e2d9aa7b92a 100644 --- a/pkgs/development/python-modules/arcam-fmj/default.nix +++ b/pkgs/development/python-modules/arcam-fmj/default.nix @@ -1,5 +1,6 @@ { lib , buildPythonPackage +, pythonAtLeast , pythonOlder , fetchFromGitHub , aiohttp @@ -36,6 +37,18 @@ buildPythonPackage rec { pytestCheckHook ]; + disabledTests = lib.optionals (pythonAtLeast "3.12") [ + # stuck on EpollSelector.poll() + "test_power" + "test_multiple" + "test_invalid_command" + "test_state" + "test_silent_server_request" + "test_silent_server_disconnect" + "test_heartbeat" + "test_cancellation" + ]; + pythonImportsCheck = [ "arcam.fmj" "arcam.fmj.client" diff --git a/pkgs/development/python-modules/pyatv/default.nix b/pkgs/development/python-modules/pyatv/default.nix index d584b410d7cd..a422e45057b8 100644 --- a/pkgs/development/python-modules/pyatv/default.nix +++ b/pkgs/development/python-modules/pyatv/default.nix @@ -18,6 +18,7 @@ , pytest-timeout , pytestCheckHook , pythonRelaxDepsHook +, pythonAtLeast , pythonOlder , requests , setuptools @@ -95,6 +96,9 @@ buildPythonPackage rec { disabledTests = [ # https://github.com/postlund/pyatv/issues/2307 "test_zeroconf_service_published" + ] ++ lib.optionals (pythonAtLeast "3.12") [ + # https://github.com/postlund/pyatv/issues/2365 + "test_simple_dispatch" ] ++ lib.optionals (stdenv.isDarwin) [ # tests/protocols/raop/test_raop_functional.py::test_stream_retransmission[raop_properties2-2-True] - assert False "test_stream_retransmission" diff --git a/pkgs/development/python-modules/pykaleidescape/default.nix b/pkgs/development/python-modules/pykaleidescape/default.nix index b11f99b74112..af2645006e18 100644 --- a/pkgs/development/python-modules/pykaleidescape/default.nix +++ b/pkgs/development/python-modules/pykaleidescape/default.nix @@ -5,6 +5,7 @@ , fetchFromGitHub , pytest-asyncio , pytestCheckHook +, pythonAtLeast , pythonOlder }: @@ -39,6 +40,10 @@ buildPythonPackage rec { disabledTests = [ # Test requires network access "test_resolve_succeeds" + ] ++ lib.optionals (pythonAtLeast "3.12") [ + # stuck in EpollSelector.poll() + "test_manual_disconnect" + "test_concurrency" ]; meta = with lib; { diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 1d0809edf320..c06beb881892 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -4,7 +4,7 @@ , fetchFromGitHub , fetchPypi , fetchpatch -, python311 +, python312 , substituteAll , ffmpeg-headless , inetutils @@ -375,6 +375,9 @@ let inherit version; hash = "sha256-6xjnunJoqIC/HM/pLlNOlqs04Dl/KNy8s/wNpPaltr0="; }; + pytestFlagsArray = [ + "-W" "ignore::DeprecationWarning" + ]; }); voluptuous = super.voluptuous.overridePythonAttrs (oldAttrs: rec { @@ -444,7 +447,7 @@ let }) ]; - python = python311.override { + python = python312.override { packageOverrides = lib.composeManyExtensions (defaultOverrides ++ [ packageOverrides ]); }; @@ -496,6 +499,7 @@ in python.pkgs.buildPythonApplication rec { pythonRelaxDeps = [ "attrs" + "bcrypt" "ciso8601" "orjson" "pyopenssl"