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

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


The following commit(s) were added to refs/heads/master by this push:
     new 7800fbd5d8c [fix][python]Fix generated Python protobuf code not 
compatible with latest protobuf package (#15846)
7800fbd5d8c is described below

commit 7800fbd5d8cdbeb307f98a8d9408bb5309f41c0d
Author: Christophe Bornet <[email protected]>
AuthorDate: Tue May 31 11:14:48 2022 +0200

    [fix][python]Fix generated Python protobuf code not compatible with latest 
protobuf package (#15846)
    
    * [fix][python]Fix generated Python protobuf code not compatible with 
latest protobuf package
    Protobuf latest 4.21 (v21) version broke compatibility with files generated 
with protoc < 3.19
    This fix downgrades protobuf python package to 3.20.1.
    See https://developers.google.com/protocol-buffers/docs/news/2022-05-06
    
    * Limit protobuf version to 3.20.* in setup.py
    
    Co-authored-by: Lari Hotari <[email protected]>
---
 pulsar-client-cpp/python/setup.py                                  | 2 +-
 pulsar-functions/instance/src/scripts/run_python_instance_tests.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pulsar-client-cpp/python/setup.py 
b/pulsar-client-cpp/python/setup.py
index 99f1f983236..684d809d1a9 100644
--- a/pulsar-client-cpp/python/setup.py
+++ b/pulsar-client-cpp/python/setup.py
@@ -82,7 +82,7 @@ extras_require = {}
 # functions dependencies
 extras_require["functions"] = sorted(
     {
-      "protobuf>=3.6.1",
+      "protobuf>=3.6.1,<=3.20.*",
       "grpcio<1.28,>=1.8.2",
       "apache-bookkeeper-client>=4.9.2",
       "prometheus_client",
diff --git a/pulsar-functions/instance/src/scripts/run_python_instance_tests.sh 
b/pulsar-functions/instance/src/scripts/run_python_instance_tests.sh
index 8f1191cfd80..613e7b4db22 100755
--- a/pulsar-functions/instance/src/scripts/run_python_instance_tests.sh
+++ b/pulsar-functions/instance/src/scripts/run_python_instance_tests.sh
@@ -21,7 +21,7 @@
 
 # Make sure dependencies are installed
 pip3 install mock --user
-pip3 install protobuf --user
+pip3 install protobuf==3.20.1 --user
 pip3 install fastavro --user
 
 CUR_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"

Reply via email to