Skip to content

Refactor 'gcloud.streaming.http_wrapper' exception handling - #1249

Merged
dhermes merged 3 commits into
googleapis:masterfrom
tseaver:1223-refactor_streaming_exception_handling
Nov 30, 2015
Merged

Refactor 'gcloud.streaming.http_wrapper' exception handling#1249
dhermes merged 3 commits into
googleapis:masterfrom
tseaver:1223-refactor_streaming_exception_handling

Conversation

@tseaver

Copy link
Copy Markdown
Contributor
  • Catch only explicitly retryable exceptions, and handle retry count / interval explicitly in make_api_request.
  • Delete the handle_heep_exceptions helper, and the retry_func argument which used it as a default.
  • Rename _rebuild_http_connections -> _reset_http_connections for clarity.

Closes#1223.

- Catch only explicitly retryable exceptions, and handle retry count /
interval explicitly in 'make_api_request'.
- Delete the 'handle_heep_exceptions' helper, and the 'retry_func'
argument which used it as a default.
- Rename '_rebuild_http_connections' -> '_reset_http_connections' for
clarity.
Closes#1223.
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 30, 2015
@dhermes

Copy link
Copy Markdown
Contributor

Happy to see this! I had to peek into this mess a bit for #1248. If they collide for merging, let's stick with this one first.

Comment threadgcloud/streaming/http_wrapper.py Outdated

This comment was marked as spam.

This comment was marked as spam.

@dhermes

Copy link
Copy Markdown
Contributor

Wow this was so much less work than I expected. w00t

@dhermes

Copy link
Copy Markdown
Contributor

LGTM

@tseaver

Copy link
Copy Markdown
ContributorAuthor

@dhermes I will merge with pylint failing on Travis, since we are still working out #1248.

@dhermes

Copy link
Copy Markdown
Contributor

OK. The new commit since I reviewed is due to the ExceptionType as exc keeping exc limited to the except block's scope in Py3k?

dhermes added a commit that referenced this pull request Nov 30, 2015
…on_handling
Refactor 'gcloud.streaming.http_wrapper' exception handling
@dhermes
dhermes merged commit bc181db into googleapis:masterNov 30, 2015
@dhermes

Copy link
Copy Markdown
Contributor

@tseaver Please answer my above question, but I went ahead and merged so I can re-do #1248 so we can get it merged.

@tseaver

Copy link
Copy Markdown
ContributorAuthor

The new commit since I reviewed is due to the ExceptionType as exc keeping exc limited to the except block's scope in Py3k?

Yes: it provoked an UnboundLocalError.

@tseaver
tseaver deleted the 1223-refactor_streaming_exception_handling branch November 30, 2015 19:54
@dhermes

Copy link
Copy Markdown
Contributor

OK Good deal. Thanks.

@dhermesdhermes mentioned this pull request Jan 25, 2016
parthea added a commit that referenced this pull request Nov 24, 2025
* fix: fix docstring for map fields
* chore: format
* chore: fix typing
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this pull request Mar 2, 2026
feat: update image to
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:b8058df4c45e9a6e07f6b4d65b458d0d059241dd34c814f151c8bf6b89211209
parthea pushed a commit that referenced this pull request Mar 2, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.
Librarian Version: v0.7.0
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:b8058df4c45e9a6e07f6b4d65b458d0d059241dd34c814f151c8bf6b89211209
<details><summary>google-cloud-bigtable: 2.35.0</summary>
##
[2.35.0](googleapis/python-bigtable@v2.34.0...v2.35.0)
(2025-12-16)
### Features
* add basic interceptor to client (#1206)
([6561cfac](googleapis/python-bigtable@6561cfac))
* Add encodings for STRUCT and the Timestamp type
([72dfdc44](googleapis/python-bigtable@72dfdc44))
* add PeerInfo proto in Bigtable API
([72dfdc44](googleapis/python-bigtable@72dfdc44))
* Add Type API updates needed to support structured keys in materialized
views
([72dfdc44](googleapis/python-bigtable@72dfdc44))
* support mTLS certificates when available (#1249)
([ca20219c](googleapis/python-bigtable@ca20219c))
### Bug Fixes
* re-export AddToCell for consistency (#1241)
([2a5baf11](googleapis/python-bigtable@2a5baf11))
* async client uses fixed grace period (#1236)
([544db1cd](googleapis/python-bigtable@544db1cd))
* Deprecate credentials_file argument
([72dfdc44](googleapis/python-bigtable@72dfdc44))
* Add ReadRows/SampleRowKeys bindings for materialized views
([72dfdc44](googleapis/python-bigtable@72dfdc44))
* retry cancelled errors (#1235)
([e3fd5d86](googleapis/python-bigtable@e3fd5d86))
</details>
parthea pushed a commit that referenced this pull request Mar 9, 2026
Adds a connection variable for ignoring transaction warnings. Also adds
a **kwargs argument to the connect function. This will be used for
further connection variables in the future.
Fixesgoogleapis/python-spanner-sqlalchemy#494
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@tseaver@dhermes@googlebot