From 0d6dca0663cb122abb16da497ee9f9612f229953 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 13 Mar 2026 14:26:23 -0700 Subject: [PATCH 1/5] chore: fix testing pins to target minimum supported versions --- gapic/templates/testing/constraints-3.9.txt.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gapic/templates/testing/constraints-3.9.txt.j2 b/gapic/templates/testing/constraints-3.9.txt.j2 index 59cd2c38c8..714c7f6599 100644 --- a/gapic/templates/testing/constraints-3.9.txt.j2 +++ b/gapic/templates/testing/constraints-3.9.txt.j2 @@ -6,8 +6,8 @@ # pinning their versions to their lower bounds. # For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", # then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 +google-api-core==2.11.0 +google-auth==2.14.1 # TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) # Add the minimum supported version of grpcio to constraints files proto-plus==1.22.3 From dbbf80b8294027aa459f5e6b60b629fa744eacd8 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 13 Mar 2026 15:05:28 -0700 Subject: [PATCH 2/5] upgrade api-core version --- gapic/templates/setup.py.j2 | 2 +- gapic/templates/testing/constraints-3.9.txt.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gapic/templates/setup.py.j2 b/gapic/templates/setup.py.j2 index 831f5d0f31..a691a8169b 100644 --- a/gapic/templates/setup.py.j2 +++ b/gapic/templates/setup.py.j2 @@ -33,7 +33,7 @@ else: release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.21.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", diff --git a/gapic/templates/testing/constraints-3.9.txt.j2 b/gapic/templates/testing/constraints-3.9.txt.j2 index 714c7f6599..358539b56f 100644 --- a/gapic/templates/testing/constraints-3.9.txt.j2 +++ b/gapic/templates/testing/constraints-3.9.txt.j2 @@ -6,7 +6,7 @@ # pinning their versions to their lower bounds. # For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", # then this file should have google-cloud-foo==1.14.0 -google-api-core==2.11.0 +google-api-core==2.21.0 google-auth==2.14.1 # TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) # Add the minimum supported version of grpcio to constraints files From 3d121a243d0e42bef727d3dc0b28f2f06fa293de Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 13 Mar 2026 16:19:38 -0700 Subject: [PATCH 3/5] attempt constraint modification --- noxfile.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/noxfile.py b/noxfile.py index 649de4e7f0..f19f91282e 100644 --- a/noxfile.py +++ b/noxfile.py @@ -357,13 +357,17 @@ def showcase_library( constraints_path = str( f"{tmp_dir}/testing/constraints-{session.python}.txt" ) - # Install the library with a constraints file. - session.install( - "-e", - tmp_dir + ("[async_rest]" if rest_async_io_enabled else ""), - "-r", - constraints_path, - ) + if rest_async_io_enabled: + # modify constraints file to support async_rest + constraints = [line.strip() for line in open(constraints_path) if "google-auth" not in line and line.strip()] + session.install( + "-e", + f"{tmp_dir}[async_rest]", + *constraints + ) + else: + # Install the library with a constraints file. + session.install("-e", tmp_dir, "-r", constraints_path) # Exclude `google-auth==2.40.0` which contains a regression # https://github.com/googleapis/gapic-generator-python/issues/2385 session.install( From 22f24bfd6d5e51dcd6c3a49e1e29452237b00d39 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 13 Mar 2026 16:46:38 -0700 Subject: [PATCH 4/5] fixed constraints parsing --- noxfile.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/noxfile.py b/noxfile.py index f19f91282e..39c5cfb8ea 100644 --- a/noxfile.py +++ b/noxfile.py @@ -357,17 +357,20 @@ def showcase_library( constraints_path = str( f"{tmp_dir}/testing/constraints-{session.python}.txt" ) - if rest_async_io_enabled: - # modify constraints file to support async_rest - constraints = [line.strip() for line in open(constraints_path) if "google-auth" not in line and line.strip()] - session.install( - "-e", - f"{tmp_dir}[async_rest]", - *constraints - ) - else: + if not rest_async_io_enabled: # Install the library with a constraints file. session.install("-e", tmp_dir, "-r", constraints_path) + else: + # modify constraints file to support async_rest + constraints = [ + line.strip() + for line in open(constraints_path) + if "google-auth" not in line + and not line.startswith("#") + and line.strip() + ] + session.install("-e", f"{tmp_dir}[async_rest]", *constraints) + # Exclude `google-auth==2.40.0` which contains a regression # https://github.com/googleapis/gapic-generator-python/issues/2385 session.install( From 75d703f57e54c18f52abd9b469abdbba052aae3a Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 13 Mar 2026 17:13:26 -0700 Subject: [PATCH 5/5] updated goldens --- tests/integration/goldens/asset/setup.py | 2 +- tests/integration/goldens/asset/testing/constraints-3.9.txt | 2 +- tests/integration/goldens/credentials/setup.py | 2 +- .../integration/goldens/credentials/testing/constraints-3.9.txt | 2 +- tests/integration/goldens/eventarc/setup.py | 2 +- tests/integration/goldens/eventarc/testing/constraints-3.9.txt | 2 +- tests/integration/goldens/logging/setup.py | 2 +- tests/integration/goldens/logging/testing/constraints-3.9.txt | 2 +- tests/integration/goldens/logging_internal/setup.py | 2 +- .../goldens/logging_internal/testing/constraints-3.9.txt | 2 +- tests/integration/goldens/redis/setup.py | 2 +- tests/integration/goldens/redis/testing/constraints-3.9.txt | 2 +- tests/integration/goldens/redis_selective/setup.py | 2 +- .../goldens/redis_selective/testing/constraints-3.9.txt | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/integration/goldens/asset/setup.py b/tests/integration/goldens/asset/setup.py index 7f5523e3bf..5b9a20d329 100755 --- a/tests/integration/goldens/asset/setup.py +++ b/tests/integration/goldens/asset/setup.py @@ -39,7 +39,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.21.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", diff --git a/tests/integration/goldens/asset/testing/constraints-3.9.txt b/tests/integration/goldens/asset/testing/constraints-3.9.txt index 66ee36eb25..935c36bc88 100755 --- a/tests/integration/goldens/asset/testing/constraints-3.9.txt +++ b/tests/integration/goldens/asset/testing/constraints-3.9.txt @@ -6,7 +6,7 @@ # For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", # then this file should have google-cloud-foo==1.14.0 google-api-core==2.21.0 -google-auth==2.35.0 +google-auth==2.14.1 # TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) # Add the minimum supported version of grpcio to constraints files proto-plus==1.22.3 diff --git a/tests/integration/goldens/credentials/setup.py b/tests/integration/goldens/credentials/setup.py index 8da6aed1dd..c4a6f03f3f 100755 --- a/tests/integration/goldens/credentials/setup.py +++ b/tests/integration/goldens/credentials/setup.py @@ -39,7 +39,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.21.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", diff --git a/tests/integration/goldens/credentials/testing/constraints-3.9.txt b/tests/integration/goldens/credentials/testing/constraints-3.9.txt index ac3833d41b..f873389723 100755 --- a/tests/integration/goldens/credentials/testing/constraints-3.9.txt +++ b/tests/integration/goldens/credentials/testing/constraints-3.9.txt @@ -6,7 +6,7 @@ # For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", # then this file should have google-cloud-foo==1.14.0 google-api-core==2.21.0 -google-auth==2.35.0 +google-auth==2.14.1 # TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) # Add the minimum supported version of grpcio to constraints files proto-plus==1.22.3 diff --git a/tests/integration/goldens/eventarc/setup.py b/tests/integration/goldens/eventarc/setup.py index cbb2177568..bf811dc3fc 100755 --- a/tests/integration/goldens/eventarc/setup.py +++ b/tests/integration/goldens/eventarc/setup.py @@ -39,7 +39,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.21.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", diff --git a/tests/integration/goldens/eventarc/testing/constraints-3.9.txt b/tests/integration/goldens/eventarc/testing/constraints-3.9.txt index dcb9a9b3d8..2577af6590 100755 --- a/tests/integration/goldens/eventarc/testing/constraints-3.9.txt +++ b/tests/integration/goldens/eventarc/testing/constraints-3.9.txt @@ -6,7 +6,7 @@ # For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", # then this file should have google-cloud-foo==1.14.0 google-api-core==2.21.0 -google-auth==2.35.0 +google-auth==2.14.1 # TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) # Add the minimum supported version of grpcio to constraints files proto-plus==1.22.3 diff --git a/tests/integration/goldens/logging/setup.py b/tests/integration/goldens/logging/setup.py index 0b99458443..560660d936 100755 --- a/tests/integration/goldens/logging/setup.py +++ b/tests/integration/goldens/logging/setup.py @@ -39,7 +39,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.21.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", diff --git a/tests/integration/goldens/logging/testing/constraints-3.9.txt b/tests/integration/goldens/logging/testing/constraints-3.9.txt index ac3833d41b..f873389723 100755 --- a/tests/integration/goldens/logging/testing/constraints-3.9.txt +++ b/tests/integration/goldens/logging/testing/constraints-3.9.txt @@ -6,7 +6,7 @@ # For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", # then this file should have google-cloud-foo==1.14.0 google-api-core==2.21.0 -google-auth==2.35.0 +google-auth==2.14.1 # TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) # Add the minimum supported version of grpcio to constraints files proto-plus==1.22.3 diff --git a/tests/integration/goldens/logging_internal/setup.py b/tests/integration/goldens/logging_internal/setup.py index 0b99458443..560660d936 100755 --- a/tests/integration/goldens/logging_internal/setup.py +++ b/tests/integration/goldens/logging_internal/setup.py @@ -39,7 +39,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.21.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", diff --git a/tests/integration/goldens/logging_internal/testing/constraints-3.9.txt b/tests/integration/goldens/logging_internal/testing/constraints-3.9.txt index ac3833d41b..f873389723 100755 --- a/tests/integration/goldens/logging_internal/testing/constraints-3.9.txt +++ b/tests/integration/goldens/logging_internal/testing/constraints-3.9.txt @@ -6,7 +6,7 @@ # For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", # then this file should have google-cloud-foo==1.14.0 google-api-core==2.21.0 -google-auth==2.35.0 +google-auth==2.14.1 # TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) # Add the minimum supported version of grpcio to constraints files proto-plus==1.22.3 diff --git a/tests/integration/goldens/redis/setup.py b/tests/integration/goldens/redis/setup.py index 2cf3926c8e..36adfd9e3c 100755 --- a/tests/integration/goldens/redis/setup.py +++ b/tests/integration/goldens/redis/setup.py @@ -39,7 +39,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.21.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", diff --git a/tests/integration/goldens/redis/testing/constraints-3.9.txt b/tests/integration/goldens/redis/testing/constraints-3.9.txt index ac3833d41b..f873389723 100755 --- a/tests/integration/goldens/redis/testing/constraints-3.9.txt +++ b/tests/integration/goldens/redis/testing/constraints-3.9.txt @@ -6,7 +6,7 @@ # For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", # then this file should have google-cloud-foo==1.14.0 google-api-core==2.21.0 -google-auth==2.35.0 +google-auth==2.14.1 # TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) # Add the minimum supported version of grpcio to constraints files proto-plus==1.22.3 diff --git a/tests/integration/goldens/redis_selective/setup.py b/tests/integration/goldens/redis_selective/setup.py index 2cf3926c8e..36adfd9e3c 100755 --- a/tests/integration/goldens/redis_selective/setup.py +++ b/tests/integration/goldens/redis_selective/setup.py @@ -39,7 +39,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.21.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", diff --git a/tests/integration/goldens/redis_selective/testing/constraints-3.9.txt b/tests/integration/goldens/redis_selective/testing/constraints-3.9.txt index ac3833d41b..f873389723 100755 --- a/tests/integration/goldens/redis_selective/testing/constraints-3.9.txt +++ b/tests/integration/goldens/redis_selective/testing/constraints-3.9.txt @@ -6,7 +6,7 @@ # For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", # then this file should have google-cloud-foo==1.14.0 google-api-core==2.21.0 -google-auth==2.35.0 +google-auth==2.14.1 # TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) # Add the minimum supported version of grpcio to constraints files proto-plus==1.22.3