Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented May 29, 2015

Fixes #899.

@tseaver tseaver added the api: pubsub Issues related to the Pub/Sub API. label May 29, 2015
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 29, 2015
@dhermes
Copy link
Contributor

dhermes commented May 29, 2015

LGTM

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling b49a7c6 on tseaver:899-pubsub-subscription_pull_wo_receivedMessages into 6bc06ce on GoogleCloudPlatform:master.

tseaver added a commit that referenced this pull request May 29, 2015
…receivedMessages

#899: Harden 'Subscription.pull' against missing 'receivedMessages' in response
@tseaver tseaver merged commit c28fce8 into googleapis:master May 29, 2015
@tseaver tseaver deleted the 899-pubsub-subscription_pull_wo_receivedMessages branch May 29, 2015 20:14
@dhermes dhermes mentioned this pull request Aug 8, 2015
@dillona
Copy link

dillona commented May 1, 2016

I think this has been reintroduced. I'm seeing the following in version 0.13.0:

Exception in thread Thread-236:
Traceback (most recent call last):
File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner
self.run()
File ".\main.py", line 35, in run
worker_thread(self.thread_id)
File ".\main.py", line 161, in worker_thread
try:
File "C:\Python27\lib\site-packages\gcloud\pubsub\subscription.py", line 249, in pull
self.full_name, return_immediately, max_messages)
File "C:\Python27\lib\site-packages\gcloud\pubsub\connection.py", line 419, in subscription_pull
return response['receivedMessages']
KeyError: 'receivedMessages'

@tseaver
Copy link
Contributor Author

tseaver commented May 2, 2016

@dillona Thanks for the report! I've re-fixed it on master via dd38d66.

@weimingwill
Copy link

Hi, when are you going to release new version with this change?

@dhermes
Copy link
Contributor

dhermes commented May 9, 2016

We can cut a release this week. @tseaver WDYT?

@tseaver
Copy link
Contributor Author

tseaver commented May 9, 2016

Sure, no problem making a release soonish.

@weimingwill
Copy link

@tseaver It would be great that you will release in these few days. Thank you!

@weimingwill
Copy link

@tseaver @dhermes Are you going to release it today? Really need the fix in production

parthea pushed a commit that referenced this pull request Aug 21, 2025
* feat: link stream to use _Connection and add unit tests

* docstring

* fix unit test in python 3.7

* add system test

* lint

* correct location for system test

* fix system test

* address comments

* use dict for closing connections

* switch back to use local variable for closed connections

* removed unused variable
parthea pushed a commit that referenced this pull request Sep 16, 2025
* feat: link stream to use _Connection and add unit tests

* docstring

* fix unit test in python 3.7

* add system test

* lint

* correct location for system test

* fix system test

* address comments

* use dict for closing connections

* switch back to use local variable for closed connections

* removed unused variable
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subscription.pull() fails with KeyError
6 participants