-
Notifications
You must be signed in to change notification settings - Fork 13
Remove references to grpc.beta #127
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Also bump dependency on grpc up to 1.0.0.
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,7 @@ | |
| import collections | ||
|
|
||
|
|
||
| __version__ = '0.12.5' | ||
| __version__ = '0.12.6' | ||
|
|
||
|
|
||
| INITIAL_PAGE = object() | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,8 +30,8 @@ | |
| """Adapts the grpc surface.""" | ||
|
|
||
| from __future__ import absolute_import | ||
| from grpc.beta import implementations | ||
| from grpc.beta.interfaces import StatusCode | ||
| import grpc | ||
| from grpc import StatusCode | ||
| from grpc.framework.interfaces.face import face | ||
| from . import auth | ||
|
|
||
|
|
@@ -82,8 +82,8 @@ def grpc_auth(dummy_context, callback): | |
| def _make_channel_creds(auth_func, ssl_creds): | ||
| """Converts the auth func into the composite creds expected by grpc.""" | ||
| grpc_auth_func = _make_grpc_auth_func(auth_func) | ||
| call_creds = implementations.metadata_call_credentials(grpc_auth_func) | ||
| return implementations.composite_channel_credentials(ssl_creds, call_creds) | ||
| call_creds = grpc.metadata_call_credentials(grpc_auth_func) | ||
| return grpc.composite_channel_credentials(ssl_creds, call_creds) | ||
|
|
||
|
|
||
| def create_stub(generated_create_stub, service_path, port, ssl_creds=None, | ||
|
|
@@ -108,15 +108,14 @@ def create_stub(generated_create_stub, service_path, port, ssl_creds=None, | |
| """ | ||
| if channel is None: | ||
| if ssl_creds is None: | ||
| ssl_creds = implementations.ssl_channel_credentials( | ||
| None, None, None) | ||
| ssl_creds = grpc.ssl_channel_credentials(None, None, None) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are keyword arguments that default to Best to not pass anything at all.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
| if metadata_transformer is None: | ||
| if scopes is None: | ||
| scopes = [] | ||
| metadata_transformer = auth.make_auth_func(scopes) | ||
|
|
||
| channel_creds = _make_channel_creds(metadata_transformer, ssl_creds) | ||
| channel = implementations.secure_channel( | ||
| service_path, port, channel_creds) | ||
| target = '{}:{}'.format(service_path, port) | ||
| channel = grpc.secure_channel(target, channel_creds) | ||
|
|
||
| return generated_create_stub(channel) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,7 +50,7 @@ | |
|
|
||
| install_requires = [ | ||
| 'future>=0.15.2', | ||
| 'grpcio>=1.0rc1', | ||
| 'grpcio>=1.0.0', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to regenerate the auto-gen code with 1.0.0 to ensure everything still works correctly?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, let's update
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes. GAX
Done |
||
| 'ply==3.8', | ||
| 'protobuf>=3.0.0b3', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change this to
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
| 'oauth2client>=1.5.2', | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd feel more comfortable calling this
0.13.0, unless you have strong reason to believe that there's nothing breaking in this change to gRPC1.0.0.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Good catch -- this is definitely breaking, since we no longer support the beta entry point to the gRPC stub, which is required by older gRPC autogen.