Skip to content

Pubsub: Separate subscriber and publish future documentation.#8205

Merged
plamut merged 3 commits into
masterfrom
spf
Jun 5, 2019
Merged

Pubsub: Separate subscriber and publish future documentation.#8205
plamut merged 3 commits into
masterfrom
spf

Conversation

@anguillanneuf

@anguillanneuf anguillanneuf commented May 31, 2019

Copy link
Copy Markdown
Contributor

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.

@anguillanneuf anguillanneuf requested a review from busunkim96 as a code owner May 31, 2019 21:47
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 31, 2019
@anguillanneuf

Copy link
Copy Markdown
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
Copy Markdown
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
@anguillanneuf anguillanneuf requested a review from tseaver June 3, 2019 23:36
@sduskis sduskis requested a review from plamut June 4, 2019 16:15

@plamut plamut left a comment

Copy link
Copy Markdown
Contributor

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
parthea pushed a commit that referenced this pull request Mar 2, 2026
* separate publish futures from streaming pull futures documentation

* remove trailing whitespaces

* Add test
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