Clarifai / clarifai-python-grpc

Clarifai gRPC Python API client
https://docs.clarifai.com
Other
56 stars 20 forks source link

Increase (or remove) upper bound for protobuf requirement version #107

Closed Harmon758 closed 1 year ago

Harmon758 commented 2 years ago

The upper bound for the protobuf dependency/requirement version is set to <=3.19.3: https://github.com/Clarifai/clarifai-python-grpc/blob/2f866d40316654371801d150817b7a9a6ecf1552/setup.py#L28

That release is over 10 months old now though, and the latest version is 4.21.9: https://pypi.org/project/protobuf/#history

There are packages that have a lower bound for protobuf higher than 3.19.3 now, e.g. google-cloud-translate: https://github.com/googleapis/python-translate/blob/998eaeeb8beabc1dd31fd017a742a890c16d5c75/setup.py#L35 causing dependency resolution conflicts when attempting to install those packages with clarifai-grpc.

I'm also not sure why this upper bound was set with #84 (and later increased with https://github.com/Clarifai/clarifai-python-grpc/commit/34318b96c728dd5eae4de1fbe5949e6a877ca123), as the error in that PR's description should not have been due to clarifai-grpc. googleapis-common-protos 1.56.2 had the requirement protobuf<4.0.0dev,>=3.15.0 in the error, and clarifai-grpc had protobuf>=3.15.6 in its setup.py, so there shouldn't have been any conflict. It's likely that some other package was requiring a v4 of protobuf and installing v4.21.1 to cause that error. Regardless, googleapis-common-protos now allows protobuf < 5.0.0 since v1.56.3, which was released in June.

zeiler commented 1 year ago

https://github.com/Clarifai/clarifai-python-grpc/pull/116 I believe this one should fix your issue. Thanks for reporting.