Suppress the ImportError of ipaddress for Python 2

pull/20598/head
Lidi Zheng 5 years ago
parent 08bbbcd751
commit fbe1bc9e8f
  1. 5
      src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/iomgr.pyx.pxi

@ -17,7 +17,10 @@ from cpython cimport Py_INCREF, Py_DECREF
from libc cimport string
import socket as native_socket
import ipaddress # CPython 3.3 and above
try:
import ipaddress # CPython 3.3 and above
except ImportError:
pass
cdef grpc_socket_vtable asyncio_socket_vtable
cdef grpc_custom_resolver_vtable asyncio_resolver_vtable

Loading…
Cancel
Save