From 4ad050e457fc7e78a7a78f084e009d5dbbfb205c Mon Sep 17 00:00:00 2001 From: Xuan Wang Date: Tue, 16 Jul 2024 11:46:56 -0700 Subject: [PATCH] [Python] Update generated code warning version (#37229) Push back the date of changing warning to error in case so that it won't be a blocker for CSM launch. Closes #37229 PiperOrigin-RevId: 652924647 --- examples/python/helloworld/helloworld_pb2.py | 12 +++++++++++- examples/python/helloworld/helloworld_pb2_grpc.py | 6 +++--- src/compiler/python_generator.cc | 4 ++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/examples/python/helloworld/helloworld_pb2.py b/examples/python/helloworld/helloworld_pb2.py index 88f8715f997..6a876593d5a 100644 --- a/examples/python/helloworld/helloworld_pb2.py +++ b/examples/python/helloworld/helloworld_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: helloworld.proto -# Protobuf Python Version: 5.26.1 +# Protobuf Python Version: 5.27.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'helloworld.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() diff --git a/examples/python/helloworld/helloworld_pb2_grpc.py b/examples/python/helloworld/helloworld_pb2_grpc.py index a991c8fd3f3..f3cd60f1bab 100644 --- a/examples/python/helloworld/helloworld_pb2_grpc.py +++ b/examples/python/helloworld/helloworld_pb2_grpc.py @@ -5,10 +5,10 @@ import warnings import helloworld_pb2 as helloworld__pb2 -GRPC_GENERATED_VERSION = '1.64.0.dev0' +GRPC_GENERATED_VERSION = '1.66.0.dev0' GRPC_VERSION = grpc.__version__ -EXPECTED_ERROR_RELEASE = '1.65.0' -SCHEDULED_RELEASE_DATE = 'June 25, 2024' +EXPECTED_ERROR_RELEASE = '1.66.0' +SCHEDULED_RELEASE_DATE = 'August 6, 2024' _version_not_supported = False try: diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index bb3b0ab84aa..11bc2c5cec9 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -744,8 +744,8 @@ bool PrivateGenerator::PrintPreamble(grpc_generator::Printer* out) { var["ToolsVersion"] = config.grpc_tools_version; out->Print(var, "\nGRPC_GENERATED_VERSION = '$ToolsVersion$'\n"); out->Print("GRPC_VERSION = grpc.__version__\n"); - out->Print("EXPECTED_ERROR_RELEASE = '1.65.0'\n"); - out->Print("SCHEDULED_RELEASE_DATE = 'June 25, 2024'\n"); + out->Print("EXPECTED_ERROR_RELEASE = '1.66.0'\n"); + out->Print("SCHEDULED_RELEASE_DATE = 'August 6, 2024'\n"); out->Print("_version_not_supported = False\n\n"); out->Print("try:\n"); {