fix: relax protobuf and requests dependency lower bounds#80
Merged
sohankshirsagar merged 1 commit intomainfrom Mar 18, 2026
Merged
fix: relax protobuf and requests dependency lower bounds#80sohankshirsagar merged 1 commit intomainfrom
sohankshirsagar merged 1 commit intomainfrom
Conversation
Contributor
jy-tan
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
The SDK's dependency lower bounds for
protobufandrequestswere unnecessarily strict, causing installation failures in projects that pin older (but fully compatible) versions of these libraries. This was discovered when integrating the SDK into a project that usesgoogle-cloud-translate(which requiresprotobuf<6.0) and pinsrequests==2.32.3.Changes
protobuffrom>=6.0to>=3.20.0requestsfrom>=2.32.5to>=2.28.0Why this is safe
protobuf>=3.20.0: The SDK's core code barely usesgoogle.protobufdirectly. The only usage isgoogle.protobuf.json_format.MessageToDictingrpc/utils.py(available since protobuf 3.x, with a fallback), andprotobuf_utils.pywhich uses duck typing with no direct protobuf imports. The only file that actually requires protobuf 6 isgreeter_pb2.py, which is an e2e test artifact — not part of the SDK runtime. The primary protobuf interaction is throughbetterproto(viatusk-drift-schemas), which is independent of theprotobufpackage version.requests>=2.28.0: The SDK uses only long-stablerequestsAPIs:Session.send(),Response()constructor,_content,_content_consumed,hooks.dispatch_hook, and standard response attributes (status_code,reason,headers,content). All of these have been stable across the entirerequests2.x line. The2.28.0floor aligns with the version that dropped Python 2.7/3.6, matching the SDK's ownrequires-python = ">=3.9".