Skip to content

Commit a53487a

Browse files
authored
fix: bump grpcio to 1.59.0; require Python 3.10+ (#17351)
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 See follow up issue for failing `sqlalchemy-bigquery` tests: #17287
1 parent 0a873a3 commit a53487a

57 files changed

Lines changed: 112 additions & 202 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.librarian/generator-input/client-post-processing/bigtable-integration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ replacements:
200200
"protobuf >= 6.33.5, < 8.0.0",
201201
"google-cloud-core >= 2.0.0, <3.0.0",
202202
"grpc-google-iam-v1 >= 0.14.2, <1.0.0",
203-
"google-crc32c>=1.6.0, <2.0.0dev",
203+
"google-crc32c>=1.6.0, < 2.0.0",
204204
]
205205
count: 1
206206
- paths: [

.librarian/generator-input/client-post-processing/pubsub-integration.yaml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ replacements:
374374
- "packages/google-cloud-pubsub/setup.py"
375375
before: '([ \t]+)("grpc-google-iam-v1.*",\n)\]\nextras = \{\}'
376376
after: |-
377-
\g<1>\g<2>\g<1>"grpcio-status >= 1.51.3",
377+
\g<1>\g<2>\g<1>"grpcio-status >= 1.59.0, < 2.0.0",
378+
\g<1>"grpcio-status >= 1.75.1, < 2.0.0; python_version >= '3.14'",
378379
\g<1>"opentelemetry-api >= 1.27.0",
379380
\g<1>"opentelemetry-sdk >= 1.27.0",
380381
]
@@ -519,21 +520,7 @@ replacements:
519520
before: 'grpc-google-iam-v1==0\.14\.2\n(?!grpcio-status)'
520521
after: |-
521522
grpc-google-iam-v1==0.14.2
522-
grpcio-status==1.51.3
523+
grpcio-status==1.59.0
523524
opentelemetry-api==1.27.0
524525
opentelemetry-sdk==1.27.0
525526
count: 1
526-
527-
- paths:
528-
- "packages/google-cloud-pubsub/testing/constraints-3.10.txt"
529-
before: 'grpcio==1.59.0'
530-
after: 'grpcio==1.51.3'
531-
count: 1
532-
533-
- paths:
534-
- "packages/google-cloud-pubsub/setup.py"
535-
before: '([ \t]+)"grpcio >= [0-9\.]+, < 2\.0\.0",\n(?:[ \t]*)"grpcio >= 1\.75\.1, < 2\.0\.0; python_version >= ''3\.14''",\n'
536-
after: |-
537-
\g<1>"grpcio >= 1.51.3, < 2.0.0; python_version < '3.14'",
538-
\g<1>"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
539-
count: 1

.librarian/generator-input/client-post-processing/spanner-integration.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ replacements:
165165
# See https://github.com/googleapis/google-cloud-python/issues/12364
166166
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
167167
"google-cloud-core >= 2.0.0, < 3.0.0",
168-
"grpcio >= 1.49.1, < 2.0.0",
168+
"grpcio >= 1.59.0, < 2.0.0",
169169
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
170170
"grpc-google-iam-v1 >= 0.14.2, <1.0.0",
171171
"proto-plus >= 1.26.1, <2.0.0",
@@ -1397,6 +1397,7 @@ replacements:
13971397
protobuf==6.33.5
13981398
google-cloud-core==2.0.0
13991399
grpc-google-iam-v1==0.14.2
1400+
grpcio-status==1.59.0
14001401
sqlparse==0.4.4
14011402
grpc-interceptor==0.15.4
14021403
opentelemetry-api==1.22.0
@@ -1427,12 +1428,6 @@ replacements:
14271428
"auto",
14281429
"tests/unit",
14291430
count: 1
1430-
- paths: [packages/google-cloud-spanner/testing/constraints-3.10.txt]
1431-
before: 'grpcio==1.59.0\n(?!grpcio-status)'
1432-
after: |
1433-
grpcio==1.49.1
1434-
grpcio-status==1.49.1
1435-
count: 1
14361431
- paths: [packages/google-cloud-spanner/.coveragerc]
14371432
before: |
14381433
\[report\]

.librarian/generator-input/client-post-processing/storage-integration.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,9 +597,9 @@ replacements:
597597
# experimental in this SDK. More info in b/465352227
598598
"grpc": [
599599
"google-api-core[grpc] >= 2.27.0, < 3.0.0",
600-
"grpcio >= 1.59.0, < 2.0.0; python_version < '3.14'",
600+
"grpcio >= 1.59.0, < 2.0.0",
601601
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
602-
"grpcio-status >= 1.59.0, < 2.0.0; python_version < '3.14'",
602+
"grpcio-status >= 1.59.0, < 2.0.0",
603603
"grpcio-status >= 1.75.1, < 2.0.0; python_version >= '3.14'",
604604
"proto-plus >= 1.22.3, <2.0.0; python_version < '3.13'",
605605
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",

packages/bigquery-magics/noxfile.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,6 @@ def install_systemtest_dependencies(session, with_extras, *constraints):
290290
@nox.parametrize("with_extras", [True, False])
291291
def system(session, with_extras):
292292
"""Run the system test suite."""
293-
if session.python == "3.9":
294-
session.skip("Python 3.9 is not supported.")
295293

296294
constraints_path = str(
297295
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"

packages/bigquery-magics/setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@
5252
# See: https://github.com/googleapis/python-bigquery/issues/83 The
5353
# grpc.Channel.close() method isn't added until 1.32.0.
5454
# https://github.com/grpc/grpc/pull/15254
55-
"grpcio >= 1.47.0, < 2.0.0",
56-
"grpcio >= 1.49.1, < 2.0.0; python_version >= '3.11' and python_version < '3.14'",
55+
"grpcio >= 1.59.0, < 2.0.0",
5756
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
5857
],
5958
"bigframes": ["bigframes >= 1.17.0"],

packages/gapic-generator/gapic/ads-templates/setup.py.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ dependencies = [
3232
"google-api-core[grpc] >= 2.25.0, < 3.0.0",
3333
"google-auth >= 2.14.1, <3.0.0",
3434
"googleapis-common-protos >= 1.53.0",
35-
"grpcio >= 1.10.0",
35+
"grpcio >= 1.59.0, < 2.0.0",
3636
"proto-plus >= 1.26.1, <2.0.0",
3737
"protobuf >= 6.33.5, < 8.0.0",
3838
{% if api.requires_package(('google', 'iam', 'v1')) %}

packages/gapic-generator/noxfile.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# Helpful notes for local usage:
1616
# unset PYENV_VERSION
17-
# pyenv local 3.14.1 3.13.10 3.12.11 3.11.4 3.10.12 3.9.17
17+
# pyenv local 3.14.1 3.13.10 3.12.11 3.11.4 3.10.12
1818
# PIP_INDEX_URL=https://pypi.org/simple nox
1919

2020
from __future__ import absolute_import
@@ -70,7 +70,6 @@
7070
@nox.session(python=ALL_PYTHON)
7171
def unit(session):
7272
"""Run the unit test suite."""
73-
7473
session.install(
7574
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2478):
7675
# Temporarily pin coverage to 7.11.0

packages/gapic-generator/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"click >= 6.7",
3131
"google-api-core[grpc] >= 2.25.0, < 3.0.0",
3232
"googleapis-common-protos >= 1.55.0, < 2.0.0",
33-
"grpcio >= 1.24.3, < 2.0.0",
33+
"grpcio >= 1.59.0, < 2.0.0",
3434
# 2.11.0 is required which adds the `default` argument to `jinja-filters.map()`
3535
# https://jinja.palletsprojects.com/en/3.0.x/templates/#jinja-filters.map
3636
# https://jinja.palletsprojects.com/en/2.11.x/changelog/#version-2-11-0

packages/gcp-sphinx-docfx-yaml/docfx_yaml/markdown_utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,10 @@ def _merge_markdown_content(
307307
content before the base file content.
308308
"""
309309
try:
310-
with open(base_file, "r+") as base, open(
311-
additional_content_file, "r"
312-
) as additional_content:
310+
with (
311+
open(base_file, "r+") as base,
312+
open(additional_content_file, "r") as additional_content,
313+
):
313314
file_content = (
314315
f"{additional_content.read()}\n{base.read()}"
315316
if prepend_additional_content

0 commit comments

Comments
 (0)