From ce693947e1608be208faaf80ed280d70d71c42f7 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 3 Feb 2023 13:37:17 +0100 Subject: [PATCH 1/5] python310Packages.aiosomecomfort: 0.0.3 -> 0.0.6 https://github.com/mkmer/AIOSomecomfort/releases/tag/0.0.5 https://github.com/mkmer/AIOSomecomfort/releases/tag/0.0.6 --- .../python-modules/aiosomecomfort/default.nix | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/aiosomecomfort/default.nix b/pkgs/development/python-modules/aiosomecomfort/default.nix index 104d404a6023..d89ada4a67e3 100644 --- a/pkgs/development/python-modules/aiosomecomfort/default.nix +++ b/pkgs/development/python-modules/aiosomecomfort/default.nix @@ -3,13 +3,11 @@ , fetchFromGitHub , aiohttp , prettytable -, mock -, pytestCheckHook }: buildPythonPackage rec { pname = "aiosomecomfort"; - version = "0.0.3"; + version = "0.0.6"; format = "setuptools"; @@ -17,26 +15,19 @@ buildPythonPackage rec { owner = "mkmer"; repo = "AIOSomecomfort"; rev = "refs/tags/${version}"; - hash = "sha256-Qw0KR934GS7AuT3nRYaunypt091fZLRioVbNOp9JesY="; + hash = "sha256-3p38gWCqQVYz3sgu6SgfPH+wH/ZH2Qg+tVXiARuUh7s="; }; - postPatch = '' - # https://github.com/mkmer/AIOSomecomfort/issues/1 - mv aiosomecomfort AIOSomecomfort - ''; - propagatedBuildInputs = [ aiohttp prettytable ]; - checkInputs = [ - mock - pytestCheckHook + pythonImportsCheck = [ + "aiosomecomfort" ]; - # SyntaxError in test.py - doCheck = false; + doCheck = false; # tests only run on windows, due to WindowsSelectorEventLoopPolicy meta = { description = "AsyicIO client for US models of Honeywell Thermostats"; From 0e3aac13d2e4a10c8ec8536aa5d2abcbc91abacb Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 3 Feb 2023 13:38:34 +0100 Subject: [PATCH 2/5] python310Packages.py-synologydsm-api: 2.1.0 -> 2.1.1 Diff: https://github.com/mib1185/py-synologydsm-api/compare/refs/tags/v2.1.0...v2.1.1 Changelog: https://github.com/mib1185/py-synologydsm-api/releases/tag/v2.1.1 --- .../development/python-modules/py-synologydsm-api/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/py-synologydsm-api/default.nix b/pkgs/development/python-modules/py-synologydsm-api/default.nix index ed2c0022a0a3..8dab19a4f818 100644 --- a/pkgs/development/python-modules/py-synologydsm-api/default.nix +++ b/pkgs/development/python-modules/py-synologydsm-api/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "py-synologydsm-api"; - version = "2.1.0"; + version = "2.1.1"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "mib1185"; repo = "py-synologydsm-api"; rev = "refs/tags/v${version}"; - hash = "sha256-bolcqPIBHglZ7Em8/66MBypivDPehdgTaPOxAjR9Bd0="; + hash = "sha256-rT9KkSgIinJxTyJ40Z3VzMh23Ry9O3NFrLH4I2+NFPg="; }; nativeBuildInputs = [ From 457aaaa2bc0e2739b264075738ae73895c2572f8 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 3 Feb 2023 13:39:15 +0100 Subject: [PATCH 3/5] home-assistant: 2023.2.0 -> 2023.2.1 https://github.com/home-assistant/core/releases/tag/2023.2.1 --- pkgs/servers/home-assistant/component-packages.nix | 2 +- pkgs/servers/home-assistant/default.nix | 4 ++-- pkgs/servers/home-assistant/frontend.nix | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 1d1e2a94ae11..4ec406ff7fb3 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2,7 +2,7 @@ # Do not edit! { - version = "2023.2.0"; + version = "2023.2.1"; components = { "3_day_blinds" = ps: with ps; [ ]; diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 83607eb7f97a..4bf49b71a400 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -271,7 +271,7 @@ let extraPackagesFile = writeText "home-assistant-packages" (lib.concatMapStringsSep "\n" (pkg: pkg.pname) extraBuildInputs); # Don't forget to run parse-requirements.py after updating - hassVersion = "2023.2.0"; + hassVersion = "2023.2.1"; in python.pkgs.buildPythonApplication rec { pname = "homeassistant"; @@ -289,7 +289,7 @@ in python.pkgs.buildPythonApplication rec { owner = "home-assistant"; repo = "core"; rev = "refs/tags/${version}"; - hash = "sha256-tW1tVPJ50DIGIuxJP9nq4+Tw4fiPA+kINSclW7JkJmE="; + hash = "sha256-gWcq0E/k6c4YQJwLlU379kse2u4Yn6xvLZ5QnGXVTJA="; }; # leave this in, so users don't have to constantly update their downstream patch handling diff --git a/pkgs/servers/home-assistant/frontend.nix b/pkgs/servers/home-assistant/frontend.nix index 59661f357f8b..a3b1e7df1a5e 100644 --- a/pkgs/servers/home-assistant/frontend.nix +++ b/pkgs/servers/home-assistant/frontend.nix @@ -4,7 +4,7 @@ buildPythonPackage rec { # the frontend version corresponding to a specific home-assistant version can be found here # https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/frontend/manifest.json pname = "home-assistant-frontend"; - version = "20230201.0"; + version = "20230202.0"; format = "wheel"; src = fetchPypi { @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "home_assistant_frontend"; dist = "py3"; python = "py3"; - hash = "sha256-CG4I3YI1swiAV02+NXvi9n87dXrTJFlMUcOnB9ebmWk="; + hash = "sha256-Wo3bQnwTDSAC4EhJeYIXx1wODyx3wA2KMMaM3pJEkGw="; }; # there is nothing to strip in this package From 96128cb7e42794fb96a92a83fa7b903f91b7e0ac Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 3 Feb 2023 15:49:00 +0100 Subject: [PATCH 4/5] python310Packages.pyqwikswitch: init at 0.94 --- .../python-modules/pyqwikswitch/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/pyqwikswitch/default.nix diff --git a/pkgs/development/python-modules/pyqwikswitch/default.nix b/pkgs/development/python-modules/pyqwikswitch/default.nix new file mode 100644 index 000000000000..20a5d59833db --- /dev/null +++ b/pkgs/development/python-modules/pyqwikswitch/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, attrs +, requests +, python +}: + +buildPythonPackage rec { + pname = "pyqwikswitch"; + version = "0.94"; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-IpyWz+3EMr0I+xULBJJhBgdnQHNPJIM1SqKFLpszhQc="; + }; + + propagatedBuildInputs = [ + attrs + requests + ]; + + pythonImportsCheck = [ + "pyqwikswitch" + "pyqwikswitch.threaded" + ]; + + doCheck = false; # no tests in sdist + + meta = with lib; { + description = "QwikSwitch USB Modem API binding for Python"; + homepage = "https://github.com/kellerza/pyqwikswitch"; + license = licenses.mit; + maintainers = teams.home-assistant.members; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bac9f1031b0d..5f6ec1c8dbc3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8620,6 +8620,8 @@ self: super: with self; { pyqvrpro = callPackage ../development/python-modules/pyqvrpro { }; + pyqwikswitch = callPackage ../development/python-modules/pyqwikswitch { }; + pyrabbit2 = callPackage ../development/python-modules/pyrabbit2 { }; pyrad = callPackage ../development/python-modules/pyrad { }; From 51f802be9d7450e27e3152966f9a74b8e32395fc Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 3 Feb 2023 15:49:42 +0100 Subject: [PATCH 5/5] home-assistant: Update dependencies and tests --- .../home-assistant/component-packages.nix | 4 ++- pkgs/servers/home-assistant/default.nix | 36 +++++++++---------- pkgs/servers/home-assistant/tests.nix | 4 +-- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 4ec406ff7fb3..a2551e362a58 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2970,7 +2970,8 @@ pyqvrpro ]; "qwikswitch" = ps: with ps; [ - ]; # missing inputs: pyqwikswitch + pyqwikswitch + ]; "rachio" = ps: with ps; [ pyturbojpeg aiohttp-cors @@ -4899,6 +4900,7 @@ "qingping" "qld_bushfire" "qnap_qsw" + "qwikswitch" "rachio" "radarr" "radio_browser" diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 4bf49b71a400..62e8b042815a 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -292,6 +292,10 @@ in python.pkgs.buildPythonApplication rec { hash = "sha256-gWcq0E/k6c4YQJwLlU379kse2u4Yn6xvLZ5QnGXVTJA="; }; + nativeBuildInputs = with python3.pkgs; [ + setuptools + ]; + # leave this in, so users don't have to constantly update their downstream patch handling patches = [ (substituteAll { @@ -328,7 +332,7 @@ in python.pkgs.buildPythonApplication rec { ''; propagatedBuildInputs = with python.pkgs; [ - # Only packages required in setup.py + # Only packages required in pyproject.toml aiohttp astral async-timeout @@ -346,6 +350,7 @@ in python.pkgs.buildPythonApplication rec { lru-dict orjson pip + pyopenssl pyjwt python-slugify pyyaml @@ -353,10 +358,8 @@ in python.pkgs.buildPythonApplication rec { voluptuous voluptuous-serialize yarl - # Not in setup.py, but used in homeassistant/util/package.py + # Implicit dependency via homeassistant/requirements.py setuptools - # Not in setup.py, but uncounditionally imported via tests/conftest.py - paho-mqtt ] ++ componentBuildInputs ++ extraBuildInputs; makeWrapperArgs = lib.optional skipPip "--add-flags --skip-pip"; @@ -369,22 +372,28 @@ in python.pkgs.buildPythonApplication rec { freezegun pytest-asyncio pytest-aiohttp - pytest-freezegun + pytest-freezer pytest-mock pytest-rerunfailures pytest-socket + pytest-timeout pytest-unordered pytest-xdist pytestCheckHook requests-mock respx stdlib-list - # required by tests/auth/mfa_modules + tomli + # required through tests/auth/mfa_modules/test_otp.py pyotp + # Sneakily imported in tests/conftest.py + paho-mqtt ] ++ lib.concatMap (component: getPackages component python.pkgs) [ # some components are needed even if tests in tests/components are disabled "default_config" "hue" + # for tests/test_config.py::test_merge_id_schema + "qwikswitch" ]; pytestFlagsArray = [ @@ -395,8 +404,8 @@ in python.pkgs.buildPythonApplication rec { "--only-rerun RuntimeError" # enable full variable printing on error "--showlocals" - # helpers/test_system_info.py: AssertionError: assert 'Unknown' == 'Home Assistant Container' - "--deselect tests/helpers/test_system_info.py::test_container_installationtype" + # AssertionError: assert 1 == 0 + "--deselect tests/test_config.py::test_merge" # tests are located in tests/ "tests" ]; @@ -408,17 +417,6 @@ in python.pkgs.buildPythonApplication rec { "tests/pylint" # don't bulk test all components "tests/components" - # pyotp since v2.4.0 complains about the short mock keys, hass pins v2.3.0 - "tests/auth/mfa_modules/test_notify.py" - ]; - - disabledTests = [ - # AssertionError: assert 1 == 0 - "test_merge" - # Tests are flaky - "test_config_platform_valid" - # Test requires pylint>=2.13.0 - "test_invalid_discovery_info" ]; preCheck = '' diff --git a/pkgs/servers/home-assistant/tests.nix b/pkgs/servers/home-assistant/tests.nix index 75b63ec99a64..734823e9f475 100644 --- a/pkgs/servers/home-assistant/tests.nix +++ b/pkgs/servers/home-assistant/tests.nix @@ -76,8 +76,8 @@ in lib.listToAttrs (map (component: lib.nameValuePair component ( ++ home-assistant.getPackages component home-assistant.python.pkgs ++ extraCheckInputs.${component} or [ ]; - disabledTests = old.disabledTests ++ extraDisabledTests.${component} or []; - disabledTestPaths = old.disabledTestPaths ++ extraDisabledTestPaths.${component} or [ ]; + disabledTests = old.disabledTests or [] ++ extraDisabledTests.${component} or []; + disabledTestPaths = old.disabledTestPaths or [] ++ extraDisabledTestPaths.${component} or [ ]; # components are more often racy than the core dontUsePytestXdist = true;