From ff1d46f27ed8fef3342556dc2e14c67485dcfc6b Mon Sep 17 00:00:00 2001 From: Sunny Song Date: Tue, 13 Oct 2026 19:07:14 +0000 Subject: [PATCH] fix(python): soften grpc generated version check in proto stubs Change raise RuntimeError to warnings.warn in env_pb2_grpc.py and guest_pb2_grpc.py to prevent hard crashes when importing in environments with slightly different grpcio versions. --- clients/python/src/ate_env/_gen/ateenv/v1alpha/env_pb2_grpc.py | 2 +- .../python/src/ate_env/_gen/ateenv/v1alpha/guest_pb2_grpc.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/python/src/ate_env/_gen/ateenv/v1alpha/env_pb2_grpc.py b/clients/python/src/ate_env/_gen/ateenv/v1alpha/env_pb2_grpc.py index 0723df87..09f6875d 100644 --- a/clients/python/src/ate_env/_gen/ateenv/v1alpha/env_pb2_grpc.py +++ b/clients/python/src/ate_env/_gen/ateenv/v1alpha/env_pb2_grpc.py @@ -30,7 +30,7 @@ _version_not_supported = True if _version_not_supported: - raise RuntimeError( + warnings.warn( f'The grpc package installed is at version {GRPC_VERSION},' + ' but the generated code in ateenv/v1alpha/env_pb2_grpc.py depends on' + f' grpcio>={GRPC_GENERATED_VERSION}.' diff --git a/clients/python/src/ate_env/_gen/ateenv/v1alpha/guest_pb2_grpc.py b/clients/python/src/ate_env/_gen/ateenv/v1alpha/guest_pb2_grpc.py index fbf0b049..b3e8d7b4 100644 --- a/clients/python/src/ate_env/_gen/ateenv/v1alpha/guest_pb2_grpc.py +++ b/clients/python/src/ate_env/_gen/ateenv/v1alpha/guest_pb2_grpc.py @@ -30,7 +30,7 @@ _version_not_supported = True if _version_not_supported: - raise RuntimeError( + warnings.warn( f'The grpc package installed is at version {GRPC_VERSION},' + ' but the generated code in ateenv/v1alpha/guest_pb2_grpc.py depends on' + f' grpcio>={GRPC_GENERATED_VERSION}.'