Repository navigation
Preserve whole-body binary HTTPX responses - #13
Merged
Merged
Conversation
Add response-specific binary decoding and Accept negotiation, preserving empty bodies and typed response metadata. Cover arbitrary media types and document the generator release dependency.
[Medium impact] The PR appears safe to merge; the wildcard fix preserves rejection of disjoint media types. SummaryAdds
The previous unnumbered finding is fully addressed. No new actionable issues were found in the changes since the last review. Reviews (3) · Last reviewed commit: "Accept overlapping binary response media..." · Reviewed by Greptile |
Check Accept and binary response declarations in both matching directions. Cover broader request and response ranges, structured suffix wildcards, and rejection of disjoint ranges through both operation APIs.
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.
Whole-body binary downloads currently pass through media codecs before bytes validation: arbitrary formats fail, JSON assets fail validation, and non-UTF-8 text assets can silently change bytes. Add
ResponseSpec(binary_body=True)so HTTPX preserves the body bytes, including empty bodies, while retaining status/media checks, typed headers, structured decoding, and normal error handling. Carry binary media declarations into Accept negotiation.Addresses #12.
Coordinated release dependency
This runtime change and the companion Sunday Generator change must ship together for generated clients. Release the runtime first, then update the generator's pinned Python runtime tag, validate against that published runtime, and release the generator. Consumers must regenerate their clients; upgrading the runtime alone cannot identify binary responses in older generated code. Keep issue #12 open until the coordinated releases and downstream verification are complete.
Companion generator PR (draft until the runtime release and pin update): outfoxx/sunday-generator#275.
Validation
These are local results; hosted CI runs separately. No release has been published.