Skip to content

Initialise HTTPStream.app_put - #55

Merged
davidbrochart merged 1 commit into
davidbrochart:mainfrom
graingert:claude/fix-http-stream-app-put
Jul 26, 2026
Merged

Initialise HTTPStream.app_put#55
davidbrochart merged 1 commit into
davidbrochart:mainfrom
graingert:claude/fix-http-stream-app-put

Conversation

@graingert

Copy link
Copy Markdown
Contributor

It was only ever set once a request had been spawned, but StreamClosed reads it and can arrive first - the connection dying during the spawn is enough. The is not None guard there was already written as though it might be unset.

Annotating it made the type checker point at the two call sites that use it without a guard, where a body cannot arrive before the request that opened the stream; both now say so.

Claude-Session: https://claude.ai/code/session_01Lj1kTdm3gz4JB3bjeygDaK

It was only ever set once a request had been spawned, but StreamClosed reads it
and can arrive first - the connection dying during the spawn is enough. The
`is not None` guard there was already written as though it might be unset.

Annotating it made the type checker point at the two call sites that use it
without a guard, where a body cannot arrive before the request that opened the
stream; both now say so.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lj1kTdm3gz4JB3bjeygDaK
@davidbrochart
davidbrochart merged commit a78c093 into davidbrochart:main Jul 26, 2026
20 checks passed
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.

3 participants