diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/call.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/call.pyx.pxi index a726084ec4d..c10d79cb7d3 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/call.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/call.pyx.pxi @@ -77,11 +77,6 @@ cdef class _AioCall: """Destroys the corresponding Core object for this RPC.""" grpc_call_unref(self._grpc_call_wrapper.call) - @property - def locally_cancelled(self): - """Grant Python layer access of the cancelled flag.""" - return self._is_locally_cancelled - def cancel(self, AioRpcStatus status): """Cancels the RPC in Core with given RPC status. @@ -112,12 +107,6 @@ cdef class _AioCall: # By implementation, grpc_call_cancel always return OK error = grpc_call_cancel(self._grpc_call_wrapper.call, NULL) assert error == GRPC_CALL_OK - status = AioRpcStatus( - StatusCode.cancelled, - _UNKNOWN_CANCELLATION_DETAILS, - None, - None, - ) async def unary_unary(self, bytes request, diff --git a/src/python/grpcio/grpc/experimental/aio/_call.py b/src/python/grpcio/grpc/experimental/aio/_call.py index 7acb5494b4b..a8969b06edb 100644 --- a/src/python/grpcio/grpc/experimental/aio/_call.py +++ b/src/python/grpcio/grpc/experimental/aio/_call.py @@ -297,6 +297,7 @@ class UnaryUnaryCall(Call, _base_call.UnaryUnaryCall): """Forwards the application cancellation reasoning.""" if not self._status.done(): self._set_status(status) + self._cython_call.cancel(status) self._call.cancel() return True else: