Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Make accepting transports in Python work correctly. #2156

Merged
merged 3 commits into from
Jul 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/main/resources/com/google/api/codegen/py/main.snip
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,12 @@
'credentials; these are mutually exclusive.'
)
self.transport = transport
self.transport = {@api.grpcTransportImportName}.{@api.grpcTransportClassName}(
address=self.SERVICE_ADDRESS,
channel=channel,
credentials=credentials,
)
else:
self.transport = {@api.grpcTransportImportName}.{@api.grpcTransportClassName}(
address=self.SERVICE_ADDRESS,
channel=channel,
credentials=credentials,
)

# Client information initialization.
if client_info is None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1184,11 +1184,12 @@ class LibraryServiceClient(object):
'credentials; these are mutually exclusive.'
)
self.transport = transport
self.transport = library_service_grpc_transport.LibraryServiceGrpcTransport(
address=self.SERVICE_ADDRESS,
channel=channel,
credentials=credentials,
)
else:
self.transport = library_service_grpc_transport.LibraryServiceGrpcTransport(
address=self.SERVICE_ADDRESS,
channel=channel,
credentials=credentials,
)

if client_info is None:
client_info = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -937,11 +937,12 @@ class DecrementerServiceClient(object):
'credentials; these are mutually exclusive.'
)
self.transport = transport
self.transport = decrementer_service_grpc_transport.DecrementerServiceGrpcTransport(
address=self.SERVICE_ADDRESS,
channel=channel,
credentials=credentials,
)
else:
self.transport = decrementer_service_grpc_transport.DecrementerServiceGrpcTransport(
address=self.SERVICE_ADDRESS,
channel=channel,
credentials=credentials,
)

if client_info is None:
client_info = (
Expand Down Expand Up @@ -1149,11 +1150,12 @@ class IncrementerServiceClient(object):
'credentials; these are mutually exclusive.'
)
self.transport = transport
self.transport = incrementer_service_grpc_transport.IncrementerServiceGrpcTransport(
address=self.SERVICE_ADDRESS,
channel=channel,
credentials=credentials,
)
else:
self.transport = incrementer_service_grpc_transport.IncrementerServiceGrpcTransport(
address=self.SERVICE_ADDRESS,
channel=channel,
credentials=credentials,
)

if client_info is None:
client_info = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -886,11 +886,12 @@ class NoTemplatesAPIServiceClient(object):
'credentials; these are mutually exclusive.'
)
self.transport = transport
self.transport = no_templates_api_service_grpc_transport.NoTemplatesApiServiceGrpcTransport(
address=self.SERVICE_ADDRESS,
channel=channel,
credentials=credentials,
)
else:
self.transport = no_templates_api_service_grpc_transport.NoTemplatesApiServiceGrpcTransport(
address=self.SERVICE_ADDRESS,
channel=channel,
credentials=credentials,
)

if client_info is None:
client_info = (
Expand Down