Skip to content

fix(deps): take aiohttp 3.14.0 security fix; replace aioresponses#321

Merged
Pyker merged 1 commit into
masterfrom
fix/replace-aioresponses
Jun 13, 2026
Merged

fix(deps): take aiohttp 3.14.0 security fix; replace aioresponses#321
Pyker merged 1 commit into
masterfrom
fix/replace-aioresponses

Conversation

@Pyker

@Pyker Pyker commented Jun 13, 2026

Copy link
Copy Markdown
Member

What

  • Security: bump aiohttp 3.13.5 → 3.14.0 (the flagged moderate vulnerability fix). The 7-day cooldown correctly holds back the day-old 3.14.1.
  • Test tooling: replace aioresponses with a small scripted server built on aiohttp's own aiohttp.test_utils.TestServer.

Why

aiohttp 3.14.0 made stream_writer a required arg on ClientResponse.__init__(). aioresponses (last release 0.7.8, Jan 2025; unmaintained) doesn't pass it, so every mock-backed test errored and the security upgrade was blocked. The new approach runs a real loopback server, so tests never couple to aiohttp's internal response machinery again. No new dependency: TestServer ships inside aiohttp.

Changes

  • tests/test_poller_fetch.py: rewrite onto _ScriptedServer / http_server fixture (production poller.py untouched)
  • pyproject.toml: drop aioresponses from the dev group
  • uv.lock: remove aioresponses; bump aiohttp

Verification

uv run pytest200 passed on aiohttp 3.14.0; ruff check + ruff format --check clean.

Supersedes #320 (Renovate's aiohttp security PR) and #319 (Dependabot duplicate).

Note

Follow-up: aiohttp 3.14 deprecates aiohttp.BasicAuth (used in poller.py:411), slated for removal in aiohttp 4.0.

aiohttp 3.14.0 made `stream_writer` a required argument on
ClientResponse.__init__(). aioresponses (last released 0.7.8 in Jan
2025, effectively unmaintained) doesn't pass it, which broke every
mock-backed test and blocked the security upgrade.

Replace aioresponses with a small scripted server built on aiohttp's
own aiohttp.test_utils.TestServer: tests now hit a real loopback
server and no longer couple to aiohttp's internal response machinery,
so a future aiohttp change can't break them the same way. No new
dependency is added; TestServer ships inside aiohttp.

- tests/test_poller_fetch.py: rewrite onto _ScriptedServer/http_server
- pyproject.toml: drop aioresponses from the dev group
- uv.lock: remove aioresponses; bump aiohttp 3.13.5 -> 3.14.0
  (the 7-day cooldown correctly holds back the day-old 3.14.1)

Supersedes #320 (Renovate's aiohttp security PR) and #319 (Dependabot
duplicate of the same bump).
@Pyker Pyker merged commit 9404908 into master Jun 13, 2026
5 checks passed
@Pyker Pyker deleted the fix/replace-aioresponses branch June 13, 2026 19:22
Pyker added a commit that referenced this pull request Jun 13, 2026
aiohttp 3.14 deprecates aiohttp.BasicAuth (removed in 4.0). Build the
Authorization header with aiohttp.encode_basic_auth() instead, which
emits the identical "Basic <base64>" credentials for the ASCII GitHub
client_id/client_secret in use.

- mod_polling/poller.py: GitHub release auth now goes via headers=
- scripts/test_regexes.py: same swap in the regex-testing script

No behavior change; clears the DeprecationWarning surfaced by the
aiohttp 3.14.0 upgrade in #321.
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