diff --git a/pkgs/development/python-modules/aiohttp/default.nix b/pkgs/development/python-modules/aiohttp/default.nix index b988abe60108..f01b17639e8b 100644 --- a/pkgs/development/python-modules/aiohttp/default.nix +++ b/pkgs/development/python-modules/aiohttp/default.nix @@ -18,9 +18,7 @@ , aiodns , brotli , faust-cchardet -, asynctest , typing-extensions -, idna-ssl # tests_require , async-generator , freezegun @@ -75,11 +73,6 @@ buildPythonPackage rec { aiodns brotli faust-cchardet - ] ++ lib.optionals (pythonOlder "3.8") [ - asynctest - typing-extensions - ] ++ lib.optionals (pythonOlder "3.7") [ - idna-ssl ]; # NOTE: pytest-xdist cannot be added because it is flaky. See https://github.com/NixOS/nixpkgs/issues/230597 for more info. diff --git a/pkgs/development/python-modules/aionotify/default.nix b/pkgs/development/python-modules/aionotify/default.nix deleted file mode 100644 index 0483793c7bb0..000000000000 --- a/pkgs/development/python-modules/aionotify/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, asynctest -, pythonOlder -}: - -buildPythonPackage rec { - pname = "aionotify"; - version = "0.2.0"; - - src = fetchFromGitHub { - owner = "rbarrois"; - repo = "aionotify"; - rev = "v${version}"; - sha256 = "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"; - }; - - disabled = pythonOlder "3.5"; - - preCheck = '' - substituteInPlace tests/test_usage.py \ - --replace "asyncio.wait_for(task, timeout, loop=self.loop)" "asyncio.wait_for(task, timeout)" - ''; - - nativeCheckInputs = [ - asynctest - ]; - - meta = with lib; { - homepage = "https://github.com/rbarrois/aionotify"; - description = "Simple, asyncio-based inotify library for Python"; - license = with lib.licenses; [ bsd2 ]; - platforms = platforms.linux; - maintainers = with lib.maintainers; [ ]; - }; -} diff --git a/pkgs/development/python-modules/intellifire4py/default.nix b/pkgs/development/python-modules/intellifire4py/default.nix index 6266e60f7284..a38fbf9f5a07 100644 --- a/pkgs/development/python-modules/intellifire4py/default.nix +++ b/pkgs/development/python-modules/intellifire4py/default.nix @@ -1,51 +1,50 @@ { lib , aenum -, aiohttp -, asynctest , buildPythonPackage , fetchFromGitHub +, httpx +, poetry-core , pydantic -, pytest-mock +, pytest-asyncio +, pytest-httpx , pytestCheckHook , pythonOlder -, requests +, rich }: buildPythonPackage rec { pname = "intellifire4py"; - version = "2.2.2"; - format = "setuptools"; + version = "3.1.29"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "jeeftor"; repo = pname; - rev = "refs/tags/${version}"; - hash = "sha256-iqlKfpnETLqQwy5sNcK2x/TgmuN2hCfYoHEFK2WWVXI="; + rev = "refs/tags/v${version}"; + hash = "sha256-isAVq45UnKB8uMg7bhehpxIk5OOLcWx+VNZhJ8dE52Y="; }; + nativeBuildInputs = [ + poetry-core + ]; + propagatedBuildInputs = [ aenum - aiohttp + httpx pydantic - requests - ]; - - nativeCheckInputs = [ - asynctest - pytest-mock - pytestCheckHook - ]; - - disabledTests = [ - # Test file is missing - "test_json_files" + rich ]; pythonImportsCheck = [ "intellifire4py" ]; + nativeCheckInputs = [ + pytest-asyncio + pytest-httpx + pytestCheckHook + ]; meta = with lib; { description = "Module to read Intellifire fireplace status data"; diff --git a/pkgs/development/python-modules/pymelcloud/default.nix b/pkgs/development/python-modules/pymelcloud/default.nix index 079c7e31f140..ad4e529c528a 100644 --- a/pkgs/development/python-modules/pymelcloud/default.nix +++ b/pkgs/development/python-modules/pymelcloud/default.nix @@ -26,6 +26,8 @@ buildPythonPackage rec { aiohttp ]; + doCheck = pythonOlder "3.11"; # asynctest is unsupported on python3.11 + nativeCheckInputs = [ asynctest pytest-asyncio diff --git a/pkgs/development/python-modules/pyversasense/default.nix b/pkgs/development/python-modules/pyversasense/default.nix index 40c2fac51577..908d9d37f7ba 100644 --- a/pkgs/development/python-modules/pyversasense/default.nix +++ b/pkgs/development/python-modules/pyversasense/default.nix @@ -26,6 +26,8 @@ buildPythonPackage rec { aiohttp ]; + doCheck = pythonOlder "3.11"; # asynctest unsupported on python3.11 + nativeCheckInputs = [ asynctest pytest-asyncio diff --git a/pkgs/development/python-modules/zigpy-cc/default.nix b/pkgs/development/python-modules/zigpy-cc/default.nix index 54c750d94bbf..505e152f087b 100644 --- a/pkgs/development/python-modules/zigpy-cc/default.nix +++ b/pkgs/development/python-modules/zigpy-cc/default.nix @@ -32,6 +32,8 @@ buildPythonPackage rec { zigpy ]; + doCheck = pythonOlder "3.11"; # asynctest is unsupported on python3.11 + nativeCheckInputs = [ asynctest pytest-asyncio diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 1be1169c7786..5f4ee05a7327 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -117,6 +117,25 @@ let }; }); + intellifire4py = super.intellifire4py.overridePythonAttrs (oldAttrs: rec { + version = "2.2.2"; + src = fetchFromGitHub { + owner = "jeeftor"; + repo = "intellifire4py"; + rev = "refs/tags/${version}"; + hash = "sha256-iqlKfpnETLqQwy5sNcK2x/TgmuN2hCfYoHEFK2WWVXI="; + }; + nativeBuildInputs = with super; [ + setuptools + ]; + propagatedBuildInputs = with super; [ + aenum + aiohttp + pydantic + ]; + doCheck = false; # requires asynctest, which does not work on python 3.11 + }); + jaraco-abode = super.jaraco-abode.overridePythonAttrs (oldAttrs: rec { version = "3.3.0"; src = fetchFromGitHub { diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 0d7e6321d548..f0359945de1e 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -36,6 +36,7 @@ mapAliases ({ abodepy = jaraco-abode; # added 2023-02-01 acebinf = throw "acebinf has been removed because it is abandoned and broken."; # Added 2023-05-19 aioh2 = throw "aioh2 has been removed because it is abandoned and broken."; # Added 2022-03-30 + aionotify = throw "aionotify has been removed because is unmaintained and incompatible with python3.11."; # Added 2023-10-27 aiosenseme = throw "aiosenseme has been removed, because it does no longer work with the latest firmware and has become unmaintained"; # Added 2023-07-05 amazon_kclpy = amazon-kclpy; # added 2023-08-08 ansible-base = throw "ansible-base has been removed, because it is end of life"; # added 2022-03-30 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a2a025742df9..c5dfe185aef6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -304,8 +304,6 @@ self: super: with self; { aionanoleaf = callPackage ../development/python-modules/aionanoleaf { }; - aionotify = callPackage ../development/python-modules/aionotify { }; - aionotion = callPackage ../development/python-modules/aionotion { }; aiooncue = callPackage ../development/python-modules/aiooncue { };