diff --git a/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py b/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py index 50789d79940..e03acb69f9d 100644 --- a/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py +++ b/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py @@ -38,7 +38,8 @@ def main(command_arguments): return _protoc_compiler.run_main(command_arguments) -if sys.version_info[0] > 2: +# NOTE(rbellevi): importlib.abc is not supported on 3.4. +if sys.version_info >= (3, 5, 0): import contextlib import importlib import importlib.machinery