Uh oh!
There was an error while loading. Please reload this page.
Moving datastore GAX/gRPC helpers out of _http and into dedicated module. - #3036
Conversation
| @@ -0,0 +1,197 @@ | |||
| # Copyright 2014 Google Inc. | |||
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.
| @contextlib.contextmanager | ||
| def _grpc_catch_rendezvous(): | ||
| """Re-map gRPC exceptions that happen in context. |
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.
ebeb2e7 to
0109bbdComparedhermes
commented
Feb 17, 2017
@daspecster I folded those changes into the original commit (since they were super tiny) |
daspecster
commented
Feb 17, 2017
SGTM! Thanks! I know they were nitpicky. The rest LGTM but I feel like someone else should take a crack at it. |
| try: | ||
| from grpc import StatusCode | ||
| from google.cloud.grpc.datastore.v1 import datastore_pb2_grpc | ||
| from google.cloud.datastore._gax import _DatastoreAPIOverGRPC |
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.
| from grpc import StatusCode | ||
| from google.cloud.grpc.datastore.v1 import datastore_pb2_grpc | ||
| from google.cloud.datastore._gax import _DatastoreAPIOverGRPC | ||
| _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.
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.
| yield | ||
| except exceptions.GrpcRendezvous as exc: | ||
| error_code = exc.code() | ||
| error_class = _GRPC_ERROR_MAPPING.get(error_code) |
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.
| from grpc import StatusCode | ||
| from google.cloud.grpc.datastore.v1 import datastore_pb2_grpc | ||
| from google.cloud.datastore._gax import _DatastoreAPIOverGRPC | ||
| _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.
Moving datastore GAX/gRPC helpers out of _http and into dedicated module.
Moving datastore GAX/gRPC helpers out of _http and into dedicated module.
This leaves
_http.pycloser to what it should look like, but not all the way there (it is doing some of the transport choosing that should be done inclient.py)