From 7a54637d9b0e7a52ec4648505a6902610c4cc5b7 Mon Sep 17 00:00:00 2001 From: Ivan Cheung Date: Mon, 6 Jun 2022 19:17:57 -0400 Subject: [PATCH] fix: Pinned protobuf to prevent issues with pb files. (#1398) * Pinned protobuf to prevent issues with pb files. Currently, we rely on dependencies like proto-plus-python to select a protobuf library version. However, if they select an incompatible version, it can lead to issues like https://github.com/googleapis/python-aiplatform/issues/1257 * fix: Added upper limits for proto-plus + packaging * Added testing constraint Co-authored-by: Anthonios Partheniou Co-authored-by: Sam Goodman --- setup.py | 5 +++-- testing/constraints-3.6.txt | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 7db8ad5f27..d1d01a6bde 100644 --- a/setup.py +++ b/setup.py @@ -103,8 +103,9 @@ # Until this issue is closed # https://github.com/googleapis/google-cloud-python/issues/10566 "google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", - "proto-plus >= 1.15.0", - "packaging >= 14.3", + "proto-plus >= 1.15.0, <2.0.0dev", + "protobuf >= 3.19.0, <4.0.0dev", + "packaging >= 14.3, <22.0.0dev", "google-cloud-storage >= 1.32.0, < 3.0.0dev", "google-cloud-bigquery >= 1.15.0, < 3.0.0dev", "google-cloud-resource-manager >= 1.3.3, < 3.0.0dev", diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt index 0380c54f59..acf8ecba0c 100644 --- a/testing/constraints-3.6.txt +++ b/testing/constraints-3.6.txt @@ -8,6 +8,7 @@ google-api-core==1.31.5 libcst==0.2.5 proto-plus==1.15.0 +protobuf==3.19.0 mock==4.0.2 google-cloud-storage==1.32.0 google-auth==1.25.0 # TODO: Remove when google-api-core >= 1.26.0 is required