This is an automated email from the ASF dual-hosted git repository.

dianfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new a55e73d9f34 [FLINK-40415][python] Fix Python 3.9 dependency conflict 
of grpcio-tools (#28992)
a55e73d9f34 is described below

commit a55e73d9f3486e6622ce2e538aea4ed18ffcc295
Author: Dian Fu <[email protected]>
AuthorDate: Thu Aug 20 09:58:54 2026 +0800

    [FLINK-40415][python] Fix Python 3.9 dependency conflict of grpcio-tools 
(#28992)
---
 .../pyflink/fn_execution/tests/test_flink_fn_execution_pb2.py      | 7 +++++++
 flink-python/pyproject.toml                                        | 3 ++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git 
a/flink-python/pyflink/fn_execution/tests/test_flink_fn_execution_pb2.py 
b/flink-python/pyflink/fn_execution/tests/test_flink_fn_execution_pb2.py
index 12c638a342b..f1843003a34 100644
--- a/flink-python/pyflink/fn_execution/tests/test_flink_fn_execution_pb2.py
+++ b/flink-python/pyflink/fn_execution/tests/test_flink_fn_execution_pb2.py
@@ -17,6 +17,8 @@
 
################################################################################
 import filecmp
 import os
+import sys
+import unittest
 
 from pyflink.gen_protos import generate_proto_files
 from pyflink.testing.test_case_utils import PyFlinkTestCase
@@ -41,6 +43,11 @@ class FlinkFnExecutionTests(PyFlinkTestCase):
                            self.gen_protos_script,
                            self.flink_fn_execution_proto_file_name))
 
+    @unittest.skipIf(
+        sys.version_info < (3, 10),
+        "grpcio-tools 1.80.0 is incompatible with Apache Beam's grpcio "
+        "constraint on Python 3.9",
+    )
     def test_flink_fn_execution_pb2_synced(self):
         generate_proto_files('True', self.tempdir)
         self.check_file_content(self.flink_fn_execution_pb2_file_name)
diff --git a/flink-python/pyproject.toml b/flink-python/pyproject.toml
index 430715d57a3..4548404e303 100644
--- a/flink-python/pyproject.toml
+++ b/flink-python/pyproject.toml
@@ -44,7 +44,8 @@ dev = [
   "numpy>=1.22.4,<2.3.0",
   "fastavro>=1.1.0,!=1.8.0",
   "grpcio>=1.33.1,<2",
-  "grpcio-tools==1.80.0",
+  # Apache Beam 2.69 is the last version supporting Python 3.9 and requires 
grpcio<1.66.
+  "grpcio-tools==1.80.0; python_version >= '3.10'",
   "pemja>=0.5.7,<0.5.8; platform_system != 'Windows'",
   "httplib2>=0.19.0",
   "protobuf>=6.31.1,<7.0.0.dev0",

Reply via email to