Update the generated Python interop code.

https://github.com/grpc/grpc/issues/1150 tracks the fact that these
files shouldn't even exist. For now, however, they do and should be
kept current.
pull/1203/head
Nathaniel Manista 10 years ago
parent cd7096deb6
commit 89ad057854
  1. 5
      src/python/interop/interop/empty_pb2.py
  2. 5
      src/python/interop/interop/messages_pb2.py
  3. 223
      src/python/interop/interop/test_pb2.py

@ -57,6 +57,7 @@ Empty = _reflection.GeneratedProtocolMessageType('Empty', (_message.Message,), d
_sym_db.RegisterMessage(Empty) _sym_db.RegisterMessage(Empty)
from grpc.framework.face import demonstration as _face_testing import abc
from grpc.framework.face import interfaces as _face_interfaces from grpc.early_adopter import implementations
from grpc.framework.alpha import utilities
# @@protoc_insertion_point(module_scope) # @@protoc_insertion_point(module_scope)

@ -441,6 +441,7 @@ StreamingOutputCallResponse = _reflection.GeneratedProtocolMessageType('Streamin
_sym_db.RegisterMessage(StreamingOutputCallResponse) _sym_db.RegisterMessage(StreamingOutputCallResponse)
from grpc.framework.face import demonstration as _face_testing import abc
from grpc.framework.face import interfaces as _face_interfaces from grpc.early_adopter import implementations
from grpc.framework.alpha import utilities
# @@protoc_insertion_point(module_scope) # @@protoc_insertion_point(module_scope)

@ -29,121 +29,150 @@ _sym_db.RegisterFileDescriptor(DESCRIPTOR)
from grpc.framework.face import demonstration as _face_testing import abc
from grpc.framework.face import interfaces as _face_interfaces from grpc.early_adopter import implementations
class TestServiceService(object): from grpc.framework.alpha import utilities
class EarlyAdopterTestServiceServicer(object):
"""<fill me in later!>""" """<fill me in later!>"""
def __init__(self): __metaclass__ = abc.ABCMeta
pass @abc.abstractmethod
class TestServiceServicer(object): def EmptyCall(self, request, context):
"""<fill me in later!>""" raise NotImplementedError()
def EmptyCall(self, arg): @abc.abstractmethod
def UnaryCall(self, request, context):
raise NotImplementedError() raise NotImplementedError()
def UnaryCall(self, arg): @abc.abstractmethod
def StreamingOutputCall(self, request, context):
raise NotImplementedError() raise NotImplementedError()
def StreamingOutputCall(self, arg): @abc.abstractmethod
def StreamingInputCall(self, request_iterator, context):
raise NotImplementedError() raise NotImplementedError()
def StreamingInputCall(self, arg): @abc.abstractmethod
def FullDuplexCall(self, request_iterator, context):
raise NotImplementedError() raise NotImplementedError()
def FullDuplexCall(self, arg): @abc.abstractmethod
def HalfDuplexCall(self, request_iterator, context):
raise NotImplementedError()
class EarlyAdopterTestServiceServer(object):
"""<fill me in later!>"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def start(self):
raise NotImplementedError() raise NotImplementedError()
def HalfDuplexCall(self, arg): @abc.abstractmethod
def stop(self):
raise NotImplementedError() raise NotImplementedError()
class TestServiceStub(object): class EarlyAdopterTestServiceStub(object):
"""<fill me in later!>""" """<fill me in later!>"""
def EmptyCall(self, arg): __metaclass__ = abc.ABCMeta
@abc.abstractmethod
def EmptyCall(self, request):
raise NotImplementedError() raise NotImplementedError()
EmptyCall.async = None EmptyCall.async = None
def UnaryCall(self, arg): @abc.abstractmethod
def UnaryCall(self, request):
raise NotImplementedError() raise NotImplementedError()
UnaryCall.async = None UnaryCall.async = None
def StreamingOutputCall(self, arg): @abc.abstractmethod
def StreamingOutputCall(self, request):
raise NotImplementedError() raise NotImplementedError()
StreamingOutputCall.async = None StreamingOutputCall.async = None
def StreamingInputCall(self, arg): @abc.abstractmethod
def StreamingInputCall(self, request_iterator):
raise NotImplementedError() raise NotImplementedError()
StreamingInputCall.async = None StreamingInputCall.async = None
def FullDuplexCall(self, arg): @abc.abstractmethod
def FullDuplexCall(self, request_iterator):
raise NotImplementedError() raise NotImplementedError()
FullDuplexCall.async = None FullDuplexCall.async = None
def HalfDuplexCall(self, arg): @abc.abstractmethod
def HalfDuplexCall(self, request_iterator):
raise NotImplementedError() raise NotImplementedError()
HalfDuplexCall.async = None HalfDuplexCall.async = None
class _TestServiceStub(TestServiceStub): def early_adopter_create_TestService_server(servicer, port, private_key=None, certificate_chain=None):
def __init__(self, face_stub, default_timeout): import test.cpp.interop.empty_pb2
self._face_stub = face_stub import test.cpp.interop.empty_pb2
self._default_timeout = default_timeout import test.cpp.interop.messages_pb2
stub_self = self import test.cpp.interop.messages_pb2
class EmptyCall(object): import test.cpp.interop.messages_pb2
def __call__(self, arg): import test.cpp.interop.messages_pb2
return stub_self._face_stub.blocking_value_in_value_out("EmptyCall", arg, stub_self._default_timeout) import test.cpp.interop.messages_pb2
def async(self, arg): import test.cpp.interop.messages_pb2
return stub_self._face_stub.future_value_in_value_out("EmptyCall", arg, stub_self._default_timeout) import test.cpp.interop.messages_pb2
self.EmptyCall = EmptyCall() import test.cpp.interop.messages_pb2
class UnaryCall(object): import test.cpp.interop.messages_pb2
def __call__(self, arg): import test.cpp.interop.messages_pb2
return stub_self._face_stub.blocking_value_in_value_out("UnaryCall", arg, stub_self._default_timeout) method_service_descriptions = {
def async(self, arg): "EmptyCall": utilities.unary_unary_service_description(
return stub_self._face_stub.future_value_in_value_out("UnaryCall", arg, stub_self._default_timeout) servicer.EmptyCall,
self.UnaryCall = UnaryCall() test.cpp.interop.empty_pb2.Empty.FromString,
class StreamingOutputCall(object): test.cpp.interop.empty_pb2.Empty.SerializeToString,
def __call__(self, arg): ),
return stub_self._face_stub.inline_value_in_stream_out("StreamingOutputCall", arg, stub_self._default_timeout) "FullDuplexCall": utilities.stream_stream_service_description(
def async(self, arg): servicer.FullDuplexCall,
return stub_self._face_stub.inline_value_in_stream_out("StreamingOutputCall", arg, stub_self._default_timeout) test.cpp.interop.messages_pb2.StreamingOutputCallRequest.FromString,
self.StreamingOutputCall = StreamingOutputCall() test.cpp.interop.messages_pb2.StreamingOutputCallResponse.SerializeToString,
class StreamingInputCall(object): ),
def __call__(self, arg): "HalfDuplexCall": utilities.stream_stream_service_description(
return stub_self._face_stub.blocking_stream_in_value_out("StreamingInputCall", arg, stub_self._default_timeout) servicer.HalfDuplexCall,
def async(self, arg): test.cpp.interop.messages_pb2.StreamingOutputCallRequest.FromString,
return stub_self._face_stub.future_stream_in_value_out("StreamingInputCall", arg, stub_self._default_timeout) test.cpp.interop.messages_pb2.StreamingOutputCallResponse.SerializeToString,
self.StreamingInputCall = StreamingInputCall() ),
class FullDuplexCall(object): "StreamingInputCall": utilities.stream_unary_service_description(
def __call__(self, arg): servicer.StreamingInputCall,
return stub_self._face_stub.inline_stream_in_stream_out("FullDuplexCall", arg, stub_self._default_timeout) test.cpp.interop.messages_pb2.StreamingInputCallRequest.FromString,
def async(self, arg): test.cpp.interop.messages_pb2.StreamingInputCallResponse.SerializeToString,
return stub_self._face_stub.inline_stream_in_stream_out("FullDuplexCall", arg, stub_self._default_timeout) ),
self.FullDuplexCall = FullDuplexCall() "StreamingOutputCall": utilities.unary_stream_service_description(
class HalfDuplexCall(object): servicer.StreamingOutputCall,
def __call__(self, arg): test.cpp.interop.messages_pb2.StreamingOutputCallRequest.FromString,
return stub_self._face_stub.inline_stream_in_stream_out("HalfDuplexCall", arg, stub_self._default_timeout) test.cpp.interop.messages_pb2.StreamingOutputCallResponse.SerializeToString,
def async(self, arg): ),
return stub_self._face_stub.inline_stream_in_stream_out("HalfDuplexCall", arg, stub_self._default_timeout) "UnaryCall": utilities.unary_unary_service_description(
self.HalfDuplexCall = HalfDuplexCall() servicer.UnaryCall,
def mock_TestService(servicer, default_timeout): test.cpp.interop.messages_pb2.SimpleRequest.FromString,
value_in_value_out = {} test.cpp.interop.messages_pb2.SimpleResponse.SerializeToString,
value_in_stream_out = {} ),
stream_in_value_out = {} }
stream_in_stream_out = {} return implementations.server("grpc.testing.TestService", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
class EmptyCall(_face_interfaces.InlineValueInValueOutMethod): def early_adopter_create_TestService_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None):
def service(self, request, context): import test.cpp.interop.empty_pb2
return servicer.EmptyCall(request) import test.cpp.interop.empty_pb2
value_in_value_out['EmptyCall'] = EmptyCall() import test.cpp.interop.messages_pb2
class UnaryCall(_face_interfaces.InlineValueInValueOutMethod): import test.cpp.interop.messages_pb2
def service(self, request, context): import test.cpp.interop.messages_pb2
return servicer.UnaryCall(request) import test.cpp.interop.messages_pb2
value_in_value_out['UnaryCall'] = UnaryCall() import test.cpp.interop.messages_pb2
class StreamingOutputCall(_face_interfaces.InlineValueInStreamOutMethod): import test.cpp.interop.messages_pb2
def service(self, request, context): import test.cpp.interop.messages_pb2
return servicer.StreamingOutputCall(request) import test.cpp.interop.messages_pb2
value_in_stream_out['StreamingOutputCall'] = StreamingOutputCall() import test.cpp.interop.messages_pb2
class StreamingInputCall(_face_interfaces.InlineStreamInValueOutMethod): import test.cpp.interop.messages_pb2
def service(self, request, context): method_invocation_descriptions = {
return servicer.StreamingInputCall(request) "EmptyCall": utilities.unary_unary_invocation_description(
stream_in_value_out['StreamingInputCall'] = StreamingInputCall() test.cpp.interop.empty_pb2.Empty.SerializeToString,
class FullDuplexCall(_face_interfaces.InlineStreamInStreamOutMethod): test.cpp.interop.empty_pb2.Empty.FromString,
def service(self, request, context): ),
return servicer.FullDuplexCall(request) "FullDuplexCall": utilities.stream_stream_invocation_description(
stream_in_stream_out['FullDuplexCall'] = FullDuplexCall() test.cpp.interop.messages_pb2.StreamingOutputCallRequest.SerializeToString,
class HalfDuplexCall(_face_interfaces.InlineStreamInStreamOutMethod): test.cpp.interop.messages_pb2.StreamingOutputCallResponse.FromString,
def service(self, request, context): ),
return servicer.HalfDuplexCall(request) "HalfDuplexCall": utilities.stream_stream_invocation_description(
stream_in_stream_out['HalfDuplexCall'] = HalfDuplexCall() test.cpp.interop.messages_pb2.StreamingOutputCallRequest.SerializeToString,
face_linked_pair = _face_testing.server_and_stub(default_timeout,inline_value_in_value_out_methods=value_in_value_out,inline_value_in_stream_out_methods=value_in_stream_out,inline_stream_in_value_out_methods=stream_in_value_out,inline_stream_in_stream_out_methods=stream_in_stream_out) test.cpp.interop.messages_pb2.StreamingOutputCallResponse.FromString,
class LinkedPair(object): ),
def __init__(self, server, stub): "StreamingInputCall": utilities.stream_unary_invocation_description(
self.server = server test.cpp.interop.messages_pb2.StreamingInputCallRequest.SerializeToString,
self.stub = stub test.cpp.interop.messages_pb2.StreamingInputCallResponse.FromString,
stub = _TestServiceStub(face_linked_pair.stub, default_timeout) ),
return LinkedPair(None, stub) "StreamingOutputCall": utilities.unary_stream_invocation_description(
test.cpp.interop.messages_pb2.StreamingOutputCallRequest.SerializeToString,
test.cpp.interop.messages_pb2.StreamingOutputCallResponse.FromString,
),
"UnaryCall": utilities.unary_unary_invocation_description(
test.cpp.interop.messages_pb2.SimpleRequest.SerializeToString,
test.cpp.interop.messages_pb2.SimpleResponse.FromString,
),
}
return implementations.stub("grpc.testing.TestService", method_invocation_descriptions, host, port, metadata_transformer=metadata_transformer, secure=secure, root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain, server_host_override=server_host_override)
# @@protoc_insertion_point(module_scope) # @@protoc_insertion_point(module_scope)

Loading…
Cancel
Save