Interoperate with contextvars backports

pull/23107/head
Richard Belleville 5 years ago
parent 3ade93b447
commit 2d4b6e894b
  1. 6
      src/python/grpcio_tests/tests/unit/_contextvars_propagation_test.py

@ -34,7 +34,11 @@ def _unary_unary_handler(request, context):
def contextvars_supported(): def contextvars_supported():
return sys.version_info[0] == 3 and sys.version_info[1] >= 7 try:
import contextvars
return True
except ImportError:
return False
class _GenericHandler(grpc.GenericRpcHandler): class _GenericHandler(grpc.GenericRpcHandler):

Loading…
Cancel
Save