Bring Cython tests back online
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx
index b203138..b52ddb6 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx
@@ -30,6 +30,7 @@
from grpc._cython._cygrpc cimport call
from grpc._cython._cygrpc cimport completion_queue
from grpc._cython._cygrpc cimport credentials
+from grpc._cython._cygrpc cimport grpc
from grpc._cython._cygrpc cimport records
@@ -49,15 +50,17 @@
else:
raise TypeError("expected target to be str or bytes")
if client_credentials is None:
- self.c_channel = grpc.grpc_channel_create(target, c_arguments)
+ self.c_channel = grpc.grpc_insecure_channel_create(target, c_arguments,
+ NULL)
else:
self.c_channel = grpc.grpc_secure_channel_create(
- client_credentials.c_credentials, target, c_arguments)
+ client_credentials.c_credentials, target, c_arguments, NULL)
self.references.append(client_credentials)
self.references.append(target)
self.references.append(arguments)
- def create_call(self, completion_queue.CompletionQueue queue not None,
+ def create_call(self, call.Call parent, int flags,
+ completion_queue.CompletionQueue queue not None,
method, host, records.Timespec deadline not None):
if queue.is_shutting_down:
raise ValueError("queue must not be shutting down or shutdown")
@@ -75,8 +78,13 @@
raise TypeError("expected host to be str or bytes")
cdef call.Call operation_call = call.Call()
operation_call.references = [self, method, host, queue]
+ cdef grpc.grpc_call *parent_call = NULL
+ if parent is not None:
+ parent_call = parent.c_call
operation_call.c_call = grpc.grpc_channel_create_call(
- self.c_channel, queue.c_completion_queue, method, host, deadline.c_time)
+ self.c_channel, parent_call, flags,
+ queue.c_completion_queue, method, host, deadline.c_time,
+ NULL)
return operation_call
def __dealloc__(self):