From 459ceb026d078059947ac46eb4878744822e23fb Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Mon, 8 Feb 2021 15:49:05 -0800 Subject: [PATCH] Clarify the Future interface --- src/python/grpcio/grpc/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index abe87458c4f..6154666e349 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -489,7 +489,8 @@ class UnaryStreamClientInterceptor(six.with_metaclass(abc.ABCMeta)): An object that is both a Call for the RPC and an iterator of response values. Drawing response values from the returned Call-iterator may raise RpcError indicating termination of - the RPC with non-OK status. + the RPC with non-OK status. This object *should* also fulfill the + Future interface, though it may not. """ raise NotImplementedError() @@ -562,7 +563,8 @@ class StreamStreamClientInterceptor(six.with_metaclass(abc.ABCMeta)): An object that is both a Call for the RPC and an iterator of response values. Drawing response values from the returned Call-iterator may raise RpcError indicating termination of - the RPC with non-OK status. + the RPC with non-OK status. This object *should* also fulfill the + Future interface, though it may not. """ raise NotImplementedError() @@ -800,7 +802,8 @@ class UnaryStreamMultiCallable(six.with_metaclass(abc.ABCMeta)): An object that is both a Call for the RPC and an iterator of response values. Drawing response values from the returned Call-iterator may raise RpcError indicating termination of the - RPC with non-OK status. + RPC with non-OK status. This object also fulfills the Future + interface. """ raise NotImplementedError() @@ -939,7 +942,8 @@ class StreamStreamMultiCallable(six.with_metaclass(abc.ABCMeta)): An object that is both a Call for the RPC and an iterator of response values. Drawing response values from the returned Call-iterator may raise RpcError indicating termination of the - RPC with non-OK status. + RPC with non-OK status. This object also fulfills the Future + interface. """ raise NotImplementedError()