Skip to content

fix: bump grpcio to 1.59.0#17351

Draft
parthea wants to merge 2 commits into
mainfrom
bump-grpcio
Draft

fix: bump grpcio to 1.59.0#17351
parthea wants to merge 2 commits into
mainfrom
bump-grpcio

Conversation

@parthea
Copy link
Copy Markdown
Contributor

@parthea parthea commented Jun 2, 2026

PR #17260 bumped grpcio to 1.59.0 in gapic-generator. We should also make this change throughout the monorepo to reduce the maintenance burden of having multiple minimum versions.

Fixes https://github.com/googleapis/google-cloud-python/security/dependabot/642
Fixes https://github.com/googleapis/google-cloud-python/security/dependabot/641
Fixes https://github.com/googleapis/google-cloud-python/security/dependabot/120
Fixes https://github.com/googleapis/google-cloud-python/security/dependabot/672

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the minimum version of grpcio and grpcio-status to 1.59.0 across multiple packages, including google-api-core, google-cloud-pubsub, google-cloud-spanner, and google-cloud-bigquery. The reviewer identified several issues where the updated dependency constraints would accidentally omit these libraries for Python versions below 3.11 (such as Python 3.10, which is still supported). Additionally, the reviewer recommended adding the ; python_version < '3.14' environment marker to prevent overlapping requirements on Python 3.14 and above.

Comment thread packages/google-api-core/pyproject.toml Outdated
Comment on lines 63 to 66
"grpcio >= 1.59.0, < 2.0.0; python_version >= '3.11'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"grpcio-status >= 1.41.0, < 2.0.0",
"grpcio-status >= 1.49.1, < 2.0.0; python_version >= '3.11'",
"grpcio-status >= 1.59.0, < 2.0.0; python_version >= '3.11'",
"grpcio-status >= 1.75.1, < 2.0.0; python_version >= '3.14'",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

By removing the base grpcio and grpcio-status requirements and only keeping the ones with python_version >= '3.11', these dependencies are completely omitted for Python < 3.11. Since Python 3.10 is still supported, we should use python_version < '3.14' instead of python_version >= '3.11' to ensure they are installed on all supported Python versions below 3.14.

Suggested change
"grpcio >= 1.59.0, < 2.0.0; python_version >= '3.11'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"grpcio-status >= 1.41.0, < 2.0.0",
"grpcio-status >= 1.49.1, < 2.0.0; python_version >= '3.11'",
"grpcio-status >= 1.59.0, < 2.0.0; python_version >= '3.11'",
"grpcio-status >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"grpcio >= 1.59.0, < 2.0.0; python_version < '3.14'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"grpcio-status >= 1.59.0, < 2.0.0; python_version < '3.14'",
"grpcio-status >= 1.75.1, < 2.0.0; python_version >= '3.14'",

Comment on lines 69 to 70
"grpcio >= 1.59.0, < 2.0.0; python_version >= '3.11'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

By removing the base grpcio requirement and only keeping the one with python_version >= '3.11', the dependency is completely omitted for Python < 3.11. We should use python_version < '3.14' instead of python_version >= '3.11' to ensure it is installed on all supported Python versions below 3.14.

Suggested change
"grpcio >= 1.59.0, < 2.0.0; python_version >= '3.11'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"grpcio >= 1.59.0, < 2.0.0; python_version < '3.14'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",

Comment on lines 76 to 77
"grpcio >= 1.59.0, < 2.0.0; python_version >= '3.11'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

By removing the base grpcio requirement and only keeping the one with python_version >= '3.11', the dependency is completely omitted for Python < 3.11. We should use python_version < '3.14' instead of python_version >= '3.11' to ensure it is installed on all supported Python versions below 3.14.

Suggested change
"grpcio >= 1.59.0, < 2.0.0; python_version >= '3.11'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"grpcio >= 1.59.0, < 2.0.0; python_version < '3.14'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",

Comment thread packages/bigquery-magics/setup.py Outdated
Comment on lines 55 to 56
"grpcio >= 1.59.0, < 2.0.0; python_version >= '3.11' and python_version < '3.14'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

By removing the base grpcio requirement and only keeping the one with python_version >= '3.11', the dependency is completely omitted for Python < 3.11. We should use python_version < '3.14' instead of python_version >= '3.11' and python_version < '3.14' to ensure it is installed on all supported Python versions below 3.14.

Suggested change
"grpcio >= 1.59.0, < 2.0.0; python_version >= '3.11' and python_version < '3.14'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"grpcio >= 1.59.0, < 2.0.0; python_version < '3.14'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",

Comment thread packages/sqlalchemy-bigquery/setup.py Outdated
Comment on lines 64 to 65
"grpcio >= 1.59.0, < 2.0.0; python_version =='3.11'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

By removing the base grpcio requirement and only keeping the one with python_version == '3.11', the dependency is completely omitted for Python < 3.11, as well as Python 3.12 and 3.13. We should use python_version < '3.14' to ensure it is installed on all supported Python versions below 3.14.

Suggested change
"grpcio >= 1.59.0, < 2.0.0; python_version =='3.11'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"grpcio >= 1.59.0, < 2.0.0; python_version < '3.14'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",

Comment on lines +38 to +39
"grpcio-status >= 1.59.0, < 2.0.0",
"grpcio-status >= 1.75.1, < 2.0.0; python_version >= '3.14'",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To prevent overlapping requirements on Python >= 3.14, we should add the ; python_version < '3.14' environment marker to the grpcio-status >= 1.59.0 dependency, similar to how it is done for grpcio.

Suggested change
"grpcio-status >= 1.59.0, < 2.0.0",
"grpcio-status >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"grpcio-status >= 1.59.0, < 2.0.0; python_version < '3.14'",
"grpcio-status >= 1.75.1, < 2.0.0; python_version >= '3.14'",

Comment on lines +46 to 47
"grpcio >= 1.59.0, < 2.0.0",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To prevent overlapping requirements on Python >= 3.14, we should add the ; python_version < '3.14' environment marker to the grpcio >= 1.59.0 dependency.

Suggested change
"grpcio >= 1.59.0, < 2.0.0",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"grpcio >= 1.59.0, < 2.0.0; python_version < '3.14'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",

Comment on lines +47 to 48
"grpcio >= 1.59.0, < 2.0.0",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To prevent overlapping requirements on Python >= 3.14, we should add the ; python_version < '3.14' environment marker to the grpcio >= 1.59.0 dependency.

Suggested change
"grpcio >= 1.59.0, < 2.0.0",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"grpcio >= 1.59.0, < 2.0.0; python_version < '3.14'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",

@parthea parthea force-pushed the bump-grpcio branch 3 times, most recently from 0a4a7b9 to e08a0fd Compare June 2, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant