GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: support with_call for wrapped rpcs by daniel-sanche · Pull Request #550 · googleapis/python-api-core

This repository was archived by the owner on Feb 23, 2026. It is now read-only.

Conversation

@daniel-sanche

@daniel-sanche daniel-sanche commented Nov 9, 2023

Copy link
Copy Markdown
Contributor

Most grpc calls return a grpc.Call object, that contains trailing metadata and other useful information. You can then await (for async unary rpcs) or iterate over (for streaming rpcs) the Call object to get the proto results of the rpc.

This is not the case for unary synchronous calls, because there is no intermediate object. Calling the rpc results in the value directly. The grpc library provides with_call methods for this reason, which return a tuple of the rpc result and the Call object.

Currently, the gapic wrapper does not provide a way to access this data

This PR solves the issue by adding with_call to the wrap_method function, which will is passed down to the grpc callable

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@daniel-sanche
feat: support with_call for wrapped rpcs
cc237b3
@daniel-sanche
daniel-sanche requested review from a team November 9, 2023 20:32
@product-auto-label product-auto-label Bot added the size: s Pull request size is small. label Nov 9, 2023
@gcf-owl-bot
🦉 Updates from OwlBot post-processor
21d7ed0
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
@daniel-sanche daniel-sanche mentioned this pull request Nov 9, 2023
Support accessing trailing_metadata in unary functions googleapis/gapic-generator-python#1856
Closed
vchudnov-g
vchudnov-g approved these changes Nov 9, 2023
View reviewed changes
@vchudnov-g

vchudnov-g commented Nov 9, 2023

Copy link
Copy Markdown
Contributor

@daniel-sanche Could you fix the lint error?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

daniel-sanche and others added 2 commits November 9, 2023 13:21
@daniel-sanche
Merge branch 'main' into support_with_call
fe8e7a8
@daniel-sanche
fixed lint
06fb753
@daniel-sanche

daniel-sanche commented Nov 9, 2023

Copy link
Copy Markdown
Contributor Author

@daniel-sanche Could you fix the lint error?

fixed, thanks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daniel-sanche
daniel-sanche merged commit 01a57a7 into main Nov 9, 2023
@daniel-sanche
daniel-sanche deleted the support_with_call branch November 9, 2023 21:31
@release-please release-please Bot mentioned this pull request Nov 9, 2023
chore(main): release 2.14.0 #551
Merged
This was referenced May 30, 2025
chore(main): release 2.0.0 #822
Closed
chore(main): release 2.0.0 #823
Closed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@vchudnov-g vchudnov-g vchudnov-g approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size: s Pull request size is small.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@daniel-sanche @vchudnov-g
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.