From 79a71dfc682b94f47bee177a9d409ad42ff9c641 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 10 Jun 2026 11:54:46 +0000 Subject: [PATCH 1/5] fix: correct pyproject.toml configuration and bump version to 0.0.26 - Fix ruff target-version from "0.0.25" to "py312" - Fix mypy python_version from "0.0.25" to "3.12" - Update aioresponses requirement to >=0.7.10 for aiohttp compatibility - Bump version to 0.0.26 https://claude.ai/code/session_01G2GsvMN2nSvSXpAaWXRUQj --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b9cf622..a0b8a13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "violet-poolController-api" -version = "0.0.25" +version = "0.0.26" authors = [ { name="Basti (Xerolux)", email="git@xerolux.de" }, ] @@ -29,7 +29,7 @@ dependencies = [ [project.optional-dependencies] test = [ - "aioresponses>=0.7.7", + "aioresponses>=0.7.10", "pytest>=8.3", "pytest-asyncio>=0.24", ] @@ -45,13 +45,13 @@ asyncio_mode = "auto" [tool.ruff] line-length = 100 -target-version = "0.0.25" +target-version = "py312" [tool.ruff.lint] select = ["E", "F", "W", "I", "UP"] ignore = ["E501"] [tool.mypy] -python_version = "0.0.25" +python_version = "3.12" warn_return_any = true warn_unused_configs = true From f38e2300c31d53a202b1b31dcb251749e42fa72a Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 10 Jun 2026 11:55:49 +0000 Subject: [PATCH 2/5] fix: use available aioresponses version 0.7.8 aioresponses 0.7.10 does not exist. Use the latest available version 0.7.8 https://claude.ai/code/session_01G2GsvMN2nSvSXpAaWXRUQj --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a0b8a13..439efce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ dependencies = [ [project.optional-dependencies] test = [ - "aioresponses>=0.7.10", + "aioresponses>=0.7.8", "pytest>=8.3", "pytest-asyncio>=0.24", ] From 32829c38fc92bc89c0247f612b2eeb17cc1e021f Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 10 Jun 2026 11:56:20 +0000 Subject: [PATCH 3/5] fix: pin aiohttp to versions compatible with aioresponses 0.7.8 aioresponses 0.7.8 is not compatible with aiohttp 3.14+. Constrain aiohttp to <3.14 to use compatible versions. https://claude.ai/code/session_01G2GsvMN2nSvSXpAaWXRUQj --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 439efce..06169a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ "Topic :: Home Automation", ] dependencies = [ - "aiohttp>=3.11.0", + "aiohttp>=3.11.0,<3.14", ] [project.optional-dependencies] From 7ad03d01dc2315d2212e6eac9aa8adba8d0c30af Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 10 Jun 2026 11:57:34 +0000 Subject: [PATCH 4/5] fix: add conftest.py to patch aioresponses compatibility with aiohttp 3.13+ Monkey-patch aiohttp.ClientResponse.__init__ to provide the stream_writer parameter that aioresponses 0.7.8 doesn't supply but newer aiohttp versions require. https://claude.ai/code/session_01G2GsvMN2nSvSXpAaWXRUQj --- tests/conftest.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tests/conftest.py diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..e7373d1 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,39 @@ +# violet-poolController-api - API für Violet Pool Controller +# Copyright (C) 2024-2026 Xerolux +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +"""Pytest configuration and fixtures.""" + +from __future__ import annotations + +from inspect import signature + +import aiohttp.client_reqrep + + +# Monkey-patch aiohttp.ClientResponse to handle missing stream_writer parameter +# This is needed for compatibility with aioresponses 0.7.8 and aiohttp 3.13+ +_original_client_response_init = aiohttp.client_reqrep.ClientResponse.__init__ + + +def _patched_client_response_init(self: aiohttp.client_reqrep.ClientResponse, *args, **kwargs) -> None: + """Patched ClientResponse.__init__ that adds stream_writer if missing.""" + sig = signature(_original_client_response_init) + if "stream_writer" in sig.parameters and "stream_writer" not in kwargs: + kwargs["stream_writer"] = None + _original_client_response_init(self, *args, **kwargs) + + +aiohttp.client_reqrep.ClientResponse.__init__ = _patched_client_response_init From c7c91b02dded9ee5cfb6c49cef4c29ea4558fc02 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 10 Jun 2026 11:58:39 +0000 Subject: [PATCH 5/5] fix: format conftest.py to pass ruff import sorting Reformat conftest.py to meet ruff's import sorting requirements. https://claude.ai/code/session_01G2GsvMN2nSvSXpAaWXRUQj --- tests/conftest.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index e7373d1..4dd6f6a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -22,13 +22,14 @@ import aiohttp.client_reqrep - -# Monkey-patch aiohttp.ClientResponse to handle missing stream_writer parameter -# This is needed for compatibility with aioresponses 0.7.8 and aiohttp 3.13+ _original_client_response_init = aiohttp.client_reqrep.ClientResponse.__init__ -def _patched_client_response_init(self: aiohttp.client_reqrep.ClientResponse, *args, **kwargs) -> None: +def _patched_client_response_init( + self: aiohttp.client_reqrep.ClientResponse, + *args: object, + **kwargs: object, +) -> None: """Patched ClientResponse.__init__ that adds stream_writer if missing.""" sig = signature(_original_client_response_init) if "stream_writer" in sig.parameters and "stream_writer" not in kwargs: