Skip to content

fix: close async CSV responses on cancellation - #248

Open
mkzung wants to merge 1 commit into
duneanalytics:mainfrom
mkzung:fix/async-csv-response-cleanup-2026-11-09
Open

mkzung wants to merge 1 commit into
duneanalytics:mainfrom
mkzung:fix/async-csv-response-cleanup-2026-11-09

Conversation

@mkzung

@mkzung mkzung commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Canceling a CSV download while its body is streaming leaves the connection occupied. Read through aiohttp's response API so cancellation and payload errors close the response. Local HTTP regressions cover first and subsequent pages and verify another download succeeds with a one-connection limit.

Formatting, lint, strict types and all 100 unit tests pass. Python 3.11 through 3.14 pass with locked dependencies. Reverting the reads fails the connection regressions. Live Dune API tests were not run.

@mkzung
mkzung requested a review from bh2smith as a code owner November 9, 2026 11:40

This branch has not been deployed

No deployments
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