home-assistant: fix some component tests (#497069)

This commit is contained in:
dotlambda
2026-03-06 15:02:50 +00:00
committed by GitHub
3 changed files with 28 additions and 36 deletions
@@ -1,56 +1,50 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
fetchPypi,
attrs,
aiohttp,
uv-build,
aioresponses,
pytest-asyncio,
pytest-cov-stub,
pytestCheckHook,
requests,
setuptools,
}:
buildPythonPackage (finalAttrs: {
buildPythonPackage rec {
pname = "pyqwikswitch";
version = "1.0.2";
version = "0.94";
pyproject = true;
src = fetchFromGitHub {
owner = "kellerza";
repo = "pyqwikswitch";
tag = "v${finalAttrs.version}";
hash = "sha256-yx3rCPVuhsemAtFuEhPvFPHOFm2UWrXmWF3d/ZtPGo8=";
src = fetchPypi {
inherit pname version;
hash = "sha256-IpyWz+3EMr0I+xULBJJhBgdnQHNPJIM1SqKFLpszhQc=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "uv-build>=0.8.20,<0.9" uv-build
'';
patches = [
# https://github.com/kellerza/pyqwikswitch/pull/7
(fetchpatch {
name = "replace-async-timeout-with-asyncio.timeout.patch";
url = "https://github.com/kellerza/pyqwikswitch/commit/7b3f2211962b30bb6beea9a4fe17cd04cdf8e27f.patch";
hash = "sha256-sdO5jzIgKdneNY5dTngIzUFtyRg7HBGaZA1BBeAJxu4=";
})
];
build-system = [ uv-build ];
build-system = [ setuptools ];
dependencies = [
aiohttp
attrs
requests
];
pythonImportsCheck = [
"pyqwikswitch"
"pyqwikswitch.threaded"
];
nativeCheckInputs = [
aioresponses
pytest-asyncio
pytest-cov-stub
pytestCheckHook
];
doCheck = false; # no tests in sdist
meta = {
changelog = "https://github.com/kellerza/pyqwikswitch/blob/${finalAttrs.src.tag}/CHANGELOG.md";
description = "QwikSwitch USB Modem API binding for Python";
homepage = "https://github.com/kellerza/pyqwikswitch";
license = lib.licenses.mit;
teams = [ lib.teams.home-assistant ];
};
})
}
@@ -2,35 +2,33 @@
lib,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pytest-cov-stub,
pytest-mock,
pytest-socket,
pytestCheckHook,
requests,
responses,
setuptools,
}:
buildPythonPackage (finalAttrs: {
pname = "python-tado";
version = "0.19.2";
version = "0.18.16";
pyproject = true;
src = fetchFromGitHub {
owner = "wmalgadey";
repo = "PyTado";
tag = finalAttrs.version;
hash = "sha256-me62VPjKU+vh0vo4Fl86sEse1QZYD2zDpxchSiUcxTY=";
hash = "sha256-jHPTu0/DYJXbSqiJXQzmiK6gmtJf88Y0BV1wj/X+qpc=";
};
build-system = [ poetry-core ];
build-system = [ setuptools ];
dependencies = [ requests ];
nativeCheckInputs = [
pytest-cov-stub
pytest-mock
pytest-socket
pytestCheckHook
responses
];
@@ -23,14 +23,14 @@
buildPythonPackage rec {
pname = "python-telegram-bot";
version = "22.6";
version = "22.5";
pyproject = true;
src = fetchFromGitHub {
owner = "python-telegram-bot";
repo = "python-telegram-bot";
tag = "v${version}";
hash = "sha256-B7tG70Nzt7HKFD1n1Aq5DGGrcTyb4Df9LF31DGN4KQc=";
hash = "sha256-++vDura+7AkqM7gV12O2CRRQ1H7G5G22VHGo4OdyffU=";
};
build-system = [