Skip to content
This repository has been archived by the owner on Jan 26, 2018. It is now read-only.

[Python] Safe LRO imports for both gRPC and non-gRPC clients #112

Closed
bjwatson opened this issue Sep 9, 2016 · 4 comments
Closed

[Python] Safe LRO imports for both gRPC and non-gRPC clients #112

bjwatson opened this issue Sep 9, 2016 · 4 comments
Labels

Comments

@bjwatson
Copy link
Contributor

bjwatson commented Sep 9, 2016

What

The import of operations_pb2.py from googleapi-common-protos should work with or without gRPC. If the gRPC dependency is present, then it should include the long-running operations (LRO) service methods. This is currently working in googleapi-common-protos 1.3.4, but it was done manually. We want packman to handle this automatically for future releases.

Why

Google App Engine Standard for Python does not currently support gRPC, and needs to use the HTTP/JSON mode of https://github.com/GoogleCloudPlatform/gcloud-python/. There may be other use cases that would also prefer or require HTTP/JSON. googleapi-common-protos now has a soft dependency on gRPC to support the LRO service methods, and we need to make sure that operations_pb2.py can be imported with or without gRPC.

How

See what I manually did with generated/python/googleapis-common-protos/google/longrunning/operations_pb2.py in googleapis/api-client-staging#1 for version 1.3.4 of googleapi-common-protos.

@bjwatson
Copy link
Contributor Author

bjwatson commented Sep 9, 2016

FYI @nathanielmanistaatgoogle. I can close this issue if you end up solving this problem in grpc-python.

@nathanielmanistaatgoogle
Copy link
Contributor

I've opened grpc issue 8056 for the discussion.

@bjwatson
Copy link
Contributor Author

Thanks @nathanielmanistaatgoogle.

@bjwatson
Copy link
Contributor Author

This is fixed by gRPC 1.0.2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants