Skip to content

Return response metadata through the return annotation - #3

Merged
aisk merged 1 commit into
mainfrom
response-metadata
Aug 23, 2026
Merged

aisk merged 1 commit into
mainfrom
response-metadata

Conversation

@aisk

@aisk aisk commented Aug 23, 2026

Copy link
Copy Markdown
Member

Reading response headers and trailers used to go through a CallDetails object passed in as details= and filled after the call, which reads like an out parameter and never felt like Python. Now a method annotated -> tuple[T, grapec.Metadata] (members in either order, tuple[None, grapec.Metadata] for a thrift void) simply returns that tuple, and CallDetails is gone. The same wire method can be declared twice under different Python names to get both shapes, export_proto dedupes those.

@aisk
aisk merged commit 17ad15f into main Aug 23, 2026
3 checks passed
@aisk
aisk deleted the response-metadata branch August 23, 2026 07:53
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