Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pubsub: Separate subscriber and publish future documentation. #8205

Merged
merged 3 commits into from
Jun 5, 2019
Merged

Conversation

anguillanneuf
Copy link
Contributor

@anguillanneuf anguillanneuf commented May 31, 2019

This closes #7816.

This PR aims to fix the docstrings for certain methods on pubsub_v1.publisher.futures.Future and pubsub_v1.subscriber.futures.StreamingPullFuture. There are cases where the methods would share the same docstrings, but that's not always true. For example, calling result() on a publish future should return a message ID, but calling it on a StreamingPullFuture doesn't return a value, it simply keeps the RPC channel open for receiving messages.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 31, 2019
@anguillanneuf
Copy link
Contributor Author

TODO: add test for publish future.

@tseaver tseaver added api: pubsub Issues related to the Pub/Sub API. type: docs Improvement to the documentation for an API. labels Jun 3, 2019
err = self.exception(timeout=timeout)
if err is None:
return self._result
raise err
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new method needs unit tests (one for the error case, one for the normal one).

@tseaver tseaver changed the title Separate subscriber and publish future documentation Pubsub: Separate subscriber and publish future documentation. Jun 3, 2019
@sduskis sduskis requested a review from plamut June 4, 2019 16:15
Copy link
Contributor

@plamut plamut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@plamut plamut merged commit 79a4313 into master Jun 5, 2019
@tseaver tseaver deleted the spf branch June 28, 2019 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. cla: yes This human has signed the Contributor License Agreement. type: docs Improvement to the documentation for an API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pub/Sub: wrong inherited documentation for StreamingPullFuture
4 participants