Skip to content

fix(test): pin aiohttp<3.14 to work around aioresponses incompatibility - #532

Merged
shbatm merged 1 commit into
v3.x.xfrom
fix/aioresponses-aiohttp-3.14-incompat
Jul 21, 2026
Merged

fix(test): pin aiohttp<3.14 to work around aioresponses incompatibility#532
shbatm merged 1 commit into
v3.x.xfrom
fix/aioresponses-aiohttp-3.14-incompat

Conversation

@shbatm

@shbatm shbatm commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • CI has been red on both the 3.11 and 3.14 test jobs since the runner started picking up aiohttp 3.14, which added a required stream_writer kwarg to ClientResponse.__init__. aioresponses 0.7.9 (latest release) doesn't pass it when building mock responses, so every test that exercises Connection.request() through aioresponses fails with TypeError: ClientResponse.__init__() missing 1 required keyword-only argument: 'stream_writer' (11 failures).
  • Upstream fix is open but unreleased: fix: support aiohttp 3.14 required stream_writer argument pnuckowski/aioresponses#288.
  • Pinned aiohttp<3.14 in requirements-test.txt only — this doesn't touch the library's own aiohttp>=3.8.1 floor in pyproject.toml/requirements.txt, so it has no effect on downstream consumers (e.g. Home Assistant Core, which currently pins aiohttp==3.13.5 anyway).
  • Left the aiohttp.BasicAuth deprecation warning (also present in the logs) as-is for now — fixing it properly means switching to aiohttp.encode_basic_auth(), which requires bumping the floor to aiohttp>=3.14.0. That would make PyISY's requirements incompatible with HA Core's current aiohttp==3.13.5 pin, so it's out of scope here.

Test plan

  • pytest — 448 passed locally with aiohttp==3.13.5 installed
  • pre-commit run --all-files — clean
  • CI green on both Python 3.11 and 3.14 jobs

🤖 Generated with Claude Code

https://claude.ai/code/session_01PPpQYEKnQFCiy3GS3D2fKs

CI has been red on both Python 3.11 and 3.14 jobs since the runner picked
up aiohttp 3.14, which added a required ClientResponse `stream_writer`
kwarg that aioresponses 0.7.9 (latest release) doesn't pass -- 11 tests
fail with TypeError. Upstream fix is open but unreleased
(pnuckowski/aioresponses#288). Test-only pin; doesn't affect the
library's own aiohttp>=3.8.1 floor in pyproject.toml/requirements.txt.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPpQYEKnQFCiy3GS3D2fKs
@shbatm
shbatm merged commit 020a502 into v3.x.x Jul 21, 2026
4 checks passed
@shbatm
shbatm deleted the fix/aioresponses-aiohttp-3.14-incompat branch July 21, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant