home-assistant: various fixes (#538648)
This commit is contained in:
@@ -29,6 +29,10 @@ buildPythonPackage rec {
|
||||
./event-loop.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -i "/crypto.X509Extension/,+1d" tests/ssl_cert.py
|
||||
'';
|
||||
|
||||
build-system = [ poetry-core ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
@@ -43,6 +47,7 @@ buildPythonPackage rec {
|
||||
disabledTests = [
|
||||
# TimeoutError
|
||||
"test_idle_start__exits_queue_get_without_timeout_error"
|
||||
"test_client_can_connect_to_server_over_ssl"
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# Comparison to magic strings
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
pythonOlder,
|
||||
setuptools,
|
||||
setuptools_80,
|
||||
aiohttp,
|
||||
mashumaro,
|
||||
aiofiles,
|
||||
@@ -26,7 +26,7 @@ buildPythonPackage (finalAttrs: {
|
||||
hash = "sha256-/A9bP7wc+N0Jz/jJLvKHqVPjF3ddHjVKWlSN8tqGHIw=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
build-system = [ setuptools_80 ];
|
||||
|
||||
dependencies = [
|
||||
aiohttp
|
||||
|
||||
@@ -82,6 +82,8 @@ buildPythonPackage rec {
|
||||
"test_forward_remote"
|
||||
# Seems weirdly filesystem specific
|
||||
"test_put_name_too_long"
|
||||
# SFTP copy ends up with an empty file on ZFS
|
||||
"test_copy_max_requests"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "asyncssh" ];
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "azure-identity";
|
||||
version = "1.25.1";
|
||||
version = "1.25.3";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "azure_identity";
|
||||
inherit version;
|
||||
hash = "sha256-h8qDKIg95gNkQ+HDe0Do3I+3SJgkD2EHHgnS42k2FFY=";
|
||||
hash = "sha256-qyPA1jAV9QtjDvbGzzlecmL0Oc4G5dB6ZOh0xyT42eY=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
diff --git a/tests/conftest.py b/tests/conftest.py
|
||||
index 55defbe..551d19e 100644
|
||||
--- a/tests/conftest.py
|
||||
+++ b/tests/conftest.py
|
||||
@@ -9,7 +9,7 @@ from aioesphomeapi import (
|
||||
ReconnectLogic,
|
||||
)
|
||||
from bleak_retry_connector import BleakSlotManager
|
||||
-from bluetooth_adapters import BluetoothAdapters
|
||||
+from bluetooth_adapters import get_adapters
|
||||
from habluetooth import (
|
||||
BluetoothManager,
|
||||
set_manager,
|
||||
@@ -20,7 +20,7 @@ from zeroconf import Zeroconf
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
def manager():
|
||||
slot_manager = BleakSlotManager()
|
||||
- bluetooth_adapters = BluetoothAdapters()
|
||||
+ bluetooth_adapters = get_adapters()
|
||||
set_manager(BluetoothManager(bluetooth_adapters, slot_manager))
|
||||
|
||||
@@ -29,6 +29,10 @@ buildPythonPackage (finalAttrs: {
|
||||
hash = "sha256-S4tYL/fq7wMjq81WRftZ1A+RVxs7kGpaM/TfVBNBgaI=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./bluetooth-adapters-2.4.0-compat.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail "setuptools>=75.8.2" setuptools
|
||||
|
||||
@@ -25,6 +25,11 @@ buildPythonPackage rec {
|
||||
hash = "sha256-DTdxzBe9fBOH5fHME++oq62xMtBKnjY7BCevwjl8VZ8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# https://github.com/mjj4791/python-buienradar/pull/26
|
||||
./setuptools-82-compat.patch
|
||||
];
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
Author: Martin Weinelt <hexa@darmstadt.ccc.de>
|
||||
Date: Sun Jul 5 16:24:28 2026 +0200
|
||||
|
||||
Make compatible with setuptools 82
|
||||
|
||||
This migrates the version retrieval to the stdlib importlib library.
|
||||
|
||||
diff --git a/buienradar/__main__.py b/buienradar/__main__.py
|
||||
index b0838c1..b556374 100755
|
||||
--- a/buienradar/__main__.py
|
||||
+++ b/buienradar/__main__.py
|
||||
@@ -19,8 +19,8 @@ Usage:
|
||||
"""
|
||||
import logging
|
||||
import sys
|
||||
+from importlib.metadata import version
|
||||
|
||||
-import pkg_resources
|
||||
from docopt import docopt
|
||||
|
||||
from .buienradar import get_data, parse_data
|
||||
@@ -30,7 +30,7 @@ from .constants import CONTENT, MESSAGE, RAINCONTENT, SUCCESS
|
||||
def main(argv=sys.argv[1:]):
|
||||
"""Parse argument and start main program."""
|
||||
args = docopt(__doc__, argv=argv,
|
||||
- version=pkg_resources.require('buienradar')[0].version)
|
||||
+ version=version('buienradar'))
|
||||
|
||||
level = logging.ERROR
|
||||
if args['-v']:
|
||||
@@ -4,7 +4,7 @@
|
||||
async-timeout,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
setuptools_80,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -19,7 +19,7 @@ buildPythonPackage rec {
|
||||
hash = "sha256-t6nZ6KXX5GFIcdNIXyFxYtSjOuuUJmCekaBITNgcIkU=";
|
||||
};
|
||||
|
||||
buildInputs = [ setuptools ];
|
||||
buildInputs = [ setuptools_80 ];
|
||||
|
||||
dependencies = [
|
||||
aiohttp
|
||||
|
||||
@@ -2,10 +2,7 @@
|
||||
lib,
|
||||
aiohttp,
|
||||
buildPythonPackage,
|
||||
click,
|
||||
fetchFromGitHub,
|
||||
prompt-toolkit,
|
||||
pygments,
|
||||
pymodbus-repl,
|
||||
pyserial,
|
||||
pytest-asyncio,
|
||||
@@ -16,7 +13,6 @@
|
||||
setuptools,
|
||||
sqlalchemy,
|
||||
twisted,
|
||||
typer,
|
||||
}:
|
||||
|
||||
buildPythonPackage (finalAttrs: {
|
||||
|
||||
@@ -31,6 +31,11 @@ buildPythonPackage rec {
|
||||
pytest-mock
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# mock server is not compatible with pymodbus 3.13
|
||||
"test/test_pystiebeleltron.py"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "pystiebeleltron" ];
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
lib,
|
||||
amqtt,
|
||||
buildPythonPackage,
|
||||
click,
|
||||
fetchFromGitHub,
|
||||
@@ -43,7 +42,6 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
amqtt
|
||||
pytest-asyncio
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
@@ -60,6 +60,11 @@ buildPythonPackage rec {
|
||||
requests-mock
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# aiohttp api breakage, remove when bumping to 9.2.8 or newer
|
||||
"test__raise_response_exceptions"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "yalexs" ];
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
home-assistant,
|
||||
writableTmpDirAsHomeHook,
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -15,10 +16,12 @@ let
|
||||
"frontend"
|
||||
"stream"
|
||||
];
|
||||
analytics = getComponentDeps "homeassistant_hardware";
|
||||
anthropic = getComponentDeps "ai_task" ++ getComponentDeps "openai_conversation";
|
||||
assist_pipeline = getComponentDeps "frontend";
|
||||
automation = getComponentDeps "frontend" ++ getComponentDeps "mobile_app";
|
||||
axis = getComponentDeps "deconz";
|
||||
backup = getComponentDeps "homeassistant_hardware";
|
||||
bluetooth = getComponentDeps "switchbot";
|
||||
braviatv = getComponentDeps "ssdp";
|
||||
bthome = getComponentDeps "frontend";
|
||||
@@ -28,6 +31,7 @@ let
|
||||
emulated_hue = [
|
||||
defusedxml
|
||||
];
|
||||
esphome = getComponentDeps "homeassistant_hardware";
|
||||
gardena_bluetooth = getComponentDeps "husqvarna_automower_ble";
|
||||
go2rtc = [
|
||||
tqdm
|
||||
@@ -44,7 +48,11 @@ let
|
||||
homeassistant_sky_connect = getComponentDeps "zha";
|
||||
homeassistant_yellow = getComponentDeps "zha";
|
||||
homekit = getComponentDeps "frontend";
|
||||
http = getComponentDeps "cloud" ++ getComponentDeps "frontend";
|
||||
http = concatMap getComponentDeps [
|
||||
"cloud"
|
||||
"frontend"
|
||||
"homeassistant_hardware"
|
||||
];
|
||||
intelliclima = getComponentDeps "intellifire";
|
||||
logbook = getComponentDeps "alexa";
|
||||
lovelace = getComponentDeps "frontend" ++ [
|
||||
@@ -54,9 +62,11 @@ let
|
||||
mastodon = concatMap getComponentDeps [
|
||||
"stream"
|
||||
];
|
||||
matter = getComponentDeps "homeassistant_hardware";
|
||||
miele = getComponentDeps "cloud";
|
||||
mobile_app = getComponentDeps "frontend";
|
||||
mopeka = getComponentDeps "switchbot";
|
||||
mqtt = getComponentDeps "homeassistant_hardware";
|
||||
nest = [
|
||||
av
|
||||
];
|
||||
@@ -65,8 +75,14 @@ let
|
||||
pymetno
|
||||
radios
|
||||
rpi-bad-power
|
||||
];
|
||||
]
|
||||
++ getComponentDeps "homeassistant_hardware"
|
||||
++ getComponentDeps "usb";
|
||||
open_router = getComponentDeps "ai_task";
|
||||
osoenergy = [
|
||||
# loguru wants to write into HOME
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
raspberry_pi = [
|
||||
rpi-bad-power
|
||||
];
|
||||
@@ -91,10 +107,14 @@ let
|
||||
yolink = getComponentDeps "cloud";
|
||||
zeroconf = getComponentDeps "shelly";
|
||||
zha = getComponentDeps "deconz" ++ getComponentDeps "frontend";
|
||||
zwave_js = getComponentDeps "frontend";
|
||||
zwave_js = getComponentDeps "frontend" ++ getComponentDeps "homeassistant_hardware";
|
||||
};
|
||||
|
||||
extraDisabledTestPaths = {
|
||||
bluetooth = [
|
||||
# [2026.7.1] Fails to replace HCI device after advertisement became stale
|
||||
"tests/components/bluetooth/test_manager.py::test_switching_adapters_based_on_stale_with_discovered_interval"
|
||||
];
|
||||
influxdb = [
|
||||
# These tests fail because they check for the number of warnings in the
|
||||
# logs and there is an extra warning in the logs:
|
||||
@@ -122,6 +142,10 @@ let
|
||||
};
|
||||
|
||||
extraDisabledTests = {
|
||||
bsblan = [
|
||||
# [2026.7.1] outdated snapshot
|
||||
"test_diagnostics"
|
||||
];
|
||||
conversation = lib.optionals stdenv.hostPlatform.isAarch64 [
|
||||
# intent fixture mismatch on aarch64
|
||||
"test_error_no_device_on_floor"
|
||||
@@ -139,6 +163,10 @@ let
|
||||
# https://github.com/home-assistant/core/pull/172909
|
||||
"test_upload_image_device_not_in_range"
|
||||
];
|
||||
smlight = [
|
||||
# [2026.7.1] outdated snapshot
|
||||
"test_entry_diagnostics"
|
||||
];
|
||||
teslemetry = [
|
||||
# [2026.6.4] http://github.com/home-assistant/core/commit/a33a92982af19e682a0d0fa7bec0cb16929c00d1
|
||||
"test_sensors"
|
||||
@@ -154,36 +182,34 @@ let
|
||||
];
|
||||
};
|
||||
in
|
||||
lib.listToAttrs (
|
||||
map (
|
||||
component:
|
||||
lib.nameValuePair component (
|
||||
home-assistant.overridePythonAttrs (old: {
|
||||
pname = "homeassistant-test-${component}";
|
||||
pyproject = false;
|
||||
lib.genAttrs home-assistant.supportedComponentsWithTests (
|
||||
component:
|
||||
home-assistant.overridePythonAttrs (old: {
|
||||
pname = "homeassistant-test-${component}";
|
||||
pyproject = false;
|
||||
|
||||
dontBuild = true;
|
||||
dontInstall = true;
|
||||
dontBuild = true;
|
||||
dontInstall = true;
|
||||
|
||||
nativeCheckInputs =
|
||||
old.requirementsTest
|
||||
++ home-assistant.getPackages component home-assistant.python3Packages
|
||||
++ extraCheckInputs.${component} or [ ];
|
||||
nativeCheckInputs =
|
||||
old.requirementsTest
|
||||
++ home-assistant.getPackages component home-assistant.python3Packages
|
||||
++ extraCheckInputs.${component} or [ ];
|
||||
|
||||
disabledTests = extraDisabledTests.${component} or [ ];
|
||||
disabledTestPaths = extraDisabledTestPaths.${component} or [ ];
|
||||
disabledTests = extraDisabledTests.${component} or [ ];
|
||||
disabledTestPaths = extraDisabledTestPaths.${component} or [ ];
|
||||
|
||||
# components are more often racy than the core
|
||||
dontUsePytestXdist = true;
|
||||
# components are more often racy than the core
|
||||
dontUsePytestXdist = true;
|
||||
|
||||
enabledTestPaths = [ "tests/components/${component}" ];
|
||||
enabledTestPaths = [ "tests/components/${component}" ];
|
||||
|
||||
meta = old.meta // {
|
||||
broken = lib.elem component [ ];
|
||||
# upstream only tests on Linux, so do we.
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
)
|
||||
) home-assistant.supportedComponentsWithTests
|
||||
pytestFlags = [ "-vvv" ];
|
||||
|
||||
meta = old.meta // {
|
||||
broken = lib.elem component [ ];
|
||||
# upstream only tests on Linux, so do we.
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user