Uh oh!
There was an error while loading. Please reload this page.
Move '_catch_remap_gax_error' to 'core.exceptions'. - #3444
Conversation
| _HAVE_GRPC = False | ||
| _Rendezvous = None | ||
| else: | ||
| _HAVE_GRPC = True |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| if code is not None: | ||
| _HTTP_CODE_TO_EXCEPTION[code] = _eklass | ||
| _GRPC_ERROR_MAPPING = { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| @contextlib.contextmanager | ||
| def _catch_remap_gax_error(): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| 'protobuf >= 3.0.0', | ||
| 'google-auth >= 0.4.0, < 2.0.0dev', | ||
| 'google-auth-httplib2', | ||
| 'google-gax>=0.15.7, <0.16dev', |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| import unittest | ||
| from google.cloud.exceptions import _HAVE_GRPC |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
We depend on explicitly in core.
'core' now depends on it explicitly.
dhermes
commented
Jun 5, 2017
@lukesneeringer Are you good with the dependency changes? |
tseaver
commented
Jun 5, 2017
Note that this change will require releasing a new version of |
dhermes
commented
Jun 5, 2017
👍 on the release (I think @lukesneeringer is somewhat anti to the idea of |
tseaver
commented
Jun 7, 2017
@dhermes was there another new
|
dhermes
commented
Jun 7, 2017
#3436 was what I was talking about. Looks like we've hit 24 hours, so LGTM? |
tseaver
commented
Jun 7, 2017
@dhermes this PR wasn't in the penalty box :). I'm fine to merge today unless @lukesneeringer has issues with us pushing a new |
lukesneeringer
commented
Jun 14, 2017
Is the core change backwards-compatible (from an API surface standpoint), or is it something where every single subpackage has to be updated? I do not mind churn on core; back-incompat churn where everything has to move along with it makes me nervous. |
tseaver
commented
Jun 14, 2017
@lukesneeringer the API surface changes are backward-compatible (the add a new, non-API helper function), but the dependency changes are maybe problematic ( |
lukesneeringer
commented
Jun 14, 2017
That is a smidge concerning. It would mean that APIs based on HTTP only would now require the installation of (but not use of) GRPC. Would it be possible to only do the mapping if GAX was present, but not require it? (e.g. |
tseaver
commented
Jun 14, 2017
We already have this for "dual mode" APIs: even on "classic" GAE they install grpc / gax.
We can indeed revert to doing that: this PR actually backs that stuff out. |
theacodes
commented
Jul 17, 2017
I vote with Luke - can we do this in a way that doesn't require gRPC in core (for now)? I would really like to have this so I can move #3617 forward. |
tseaver
commented
Jul 31, 2017
Redoing this on a new branch (recent |
tseaver
commented
Jul 31, 2017
Reworked in #3707. |
Toward #3175.
This is the first step toward applying a more uniform mapping of GAX error codes to our exception hierarchy. For a narrower, pubsub-only fix for #3175, see #3443.