fix(deps): take aiohttp 3.14.0 security fix; replace aioresponses#321
Merged
Conversation
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).
This was referenced Jun 13, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
aiohttp3.13.5 → 3.14.0 (the flagged moderate vulnerability fix). The 7-day cooldown correctly holds back the day-old 3.14.1.aioresponseswith a small scripted server built on aiohttp's ownaiohttp.test_utils.TestServer.Why
aiohttp 3.14.0 made
stream_writera required arg onClientResponse.__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:TestServerships inside aiohttp.Changes
tests/test_poller_fetch.py: rewrite onto_ScriptedServer/http_serverfixture (productionpoller.pyuntouched)pyproject.toml: dropaioresponsesfrom the dev groupuv.lock: removeaioresponses; bumpaiohttpVerification
uv run pytest→ 200 passed on aiohttp 3.14.0;ruff check+ruff format --checkclean.Supersedes #320 (Renovate's aiohttp security PR) and #319 (Dependabot duplicate).
Note
Follow-up: aiohttp 3.14 deprecates
aiohttp.BasicAuth(used inpoller.py:411), slated for removal in aiohttp 4.0.