On Tue, Oct 18, 2016 at 11:07 AM, <mike.br...@gmail.com> wrote:

> When working with gRPC in Python,
>

With what version of gRPC Python are you working, and on what platform?
Also with what version of protocol buffers are you working?

either implementing a service or client code, it would be great if the
> types of the messages being returned or passed in were checked. That is, if
> my service is defined to return a type Foo, but I construct and return a
> type Bar object, the code should throw an error.
>
> This github issue implies that this is the intended behavior:
> https://github.com/grpc/grpc/issues/3410
>
> But in fact, I appear to be able to return any Message object without
> throwing any errors.
>

Any message object, or only mutually serializable message objects?

Is this a bug?
>

No, but if there's an opportunity here to be more helpful to applications
that contain defects, we're open to it.

Are there differing opinions on how this should work?
>

There's almost certainly someone out there who believes that since message
serialization is in the RPC path that it shouldn't incur the penalty of
explicit type-checking, but that's not my opinion at this time. What I am
reluctant to do is include explicit type-checking in generated code, which
is where I would think that it would have to go if the message class'
serialization method itself doesn't do the type-checking.
-Nathaniel

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CAEOYnAQYECd1YzrsQ2a8dYKNwYpzp4LSFwoZFAA6-DkrDz_ygg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to