Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gapic/templates/setup.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ else:
release_status = "Development Status :: 5 - Production/Stable"

dependencies = [
"google-api-core[grpc] >= 2.11.0, <3.0.0",
"google-api-core[grpc] >= 2.17.1, <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",
"grpcio >= 1.33.2, < 2.0.0",
"grpcio >= 1.44.0, < 2.0.0",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"proto-plus >= 1.22.3, <2.0.0",
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
Expand Down
24 changes: 24 additions & 0 deletions gapic/templates/testing/constraints-3.9-async-rest.txt.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{% set rest_async_io_enabled = api.all_library_settings[api.naming.proto_package].python_settings.experimental_features.rest_async_io_enabled %}
{% if rest_async_io_enabled %}
# -*- coding: utf-8 -*-
{% from '_pypi_packages.j2' import pypi_packages %}
# This constraints file is used to check that lower bounds
# are correct in setup.py
# List all library dependencies and extras in this file,
# 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
grpcio==1.44.0
proto-plus==1.22.3
protobuf==4.25.8
{% for package_tuple, package_info in pypi_packages.items() %}
{# Quick check to make sure `package_info.package_name` is not the package being generated so we don't circularly include this package in its own constraints file. #}
{% if api.naming.warehouse_package_name != package_info.package_name %}
{% if api.requires_package(package_tuple) %}
{{ package_info.package_name }}=={{ package_info.lower_bound }}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
7 changes: 3 additions & 4 deletions gapic/templates/testing/constraints-3.9.txt.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
# 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
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453)
# Add the minimum supported version of grpcio to constraints files
google-api-core==2.17.1
google-auth==2.14.1
grpcio==1.44.0
proto-plus==1.22.3
protobuf==4.25.8
{% for package_tuple, package_info in pypi_packages.items() %}
Expand Down
30 changes: 15 additions & 15 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,21 +357,21 @@ 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,
)
# Exclude `google-auth==2.40.0` which contains a regression
# https://github.com/googleapis/gapic-generator-python/issues/2385
session.install(
"--no-cache-dir",
"--force-reinstall",
"--upgrade",
"google-auth[aiohttp]!=2.40.0",
)
extras = ""
if rest_async_io_enabled:
async_rest_constraints_path = str(
f"{tmp_dir}/testing/constraints-{session.python}-async-rest.txt"
)
if os.path.exists(async_rest_constraints_path):
# use async-rest constraints if available
constraints_path = async_rest_constraints_path
else:
session.log(
f"{async_rest_constraints_path} not found. Using base constraints file"
)
extras = "[async_rest]"

session.install("-e", f"{tmp_dir}{extras}", "-r", constraints_path)
else:
# The ads templates do not have constraints files.
# See https://github.com/googleapis/gapic-generator-python/issues/1788
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/goldens/asset/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
release_status = "Development Status :: 5 - Production/Stable"

dependencies = [
"google-api-core[grpc] >= 2.11.0, <3.0.0",
"google-api-core[grpc] >= 2.17.1, <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",
"grpcio >= 1.33.2, < 2.0.0",
"grpcio >= 1.44.0, < 2.0.0",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"proto-plus >= 1.22.3, <2.0.0",
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
Expand Down
7 changes: 3 additions & 4 deletions tests/integration/goldens/asset/testing/constraints-3.9.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
# 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
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453)
# Add the minimum supported version of grpcio to constraints files
google-api-core==2.17.1
google-auth==2.14.1
grpcio==1.44.0
proto-plus==1.22.3
protobuf==4.25.8
google-cloud-access-context-manager==0.2.0
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/goldens/credentials/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
release_status = "Development Status :: 5 - Production/Stable"

dependencies = [
"google-api-core[grpc] >= 2.11.0, <3.0.0",
"google-api-core[grpc] >= 2.17.1, <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",
"grpcio >= 1.33.2, < 2.0.0",
"grpcio >= 1.44.0, < 2.0.0",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"proto-plus >= 1.22.3, <2.0.0",
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,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
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453)
# Add the minimum supported version of grpcio to constraints files
google-api-core==2.17.1
google-auth==2.14.1
grpcio==1.44.0
proto-plus==1.22.3
protobuf==4.25.8
4 changes: 2 additions & 2 deletions tests/integration/goldens/eventarc/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
release_status = "Development Status :: 5 - Production/Stable"

dependencies = [
"google-api-core[grpc] >= 2.11.0, <3.0.0",
"google-api-core[grpc] >= 2.17.1, <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",
"grpcio >= 1.33.2, < 2.0.0",
"grpcio >= 1.44.0, < 2.0.0",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"proto-plus >= 1.22.3, <2.0.0",
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
# 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
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453)
# Add the minimum supported version of grpcio to constraints files
google-api-core==2.17.1
google-auth==2.14.1
grpcio==1.44.0
proto-plus==1.22.3
protobuf==4.25.8
grpc-google-iam-v1==0.14.0
4 changes: 2 additions & 2 deletions tests/integration/goldens/logging/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
release_status = "Development Status :: 5 - Production/Stable"

dependencies = [
"google-api-core[grpc] >= 2.11.0, <3.0.0",
"google-api-core[grpc] >= 2.17.1, <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",
"grpcio >= 1.33.2, < 2.0.0",
"grpcio >= 1.44.0, < 2.0.0",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"proto-plus >= 1.22.3, <2.0.0",
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,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
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453)
# Add the minimum supported version of grpcio to constraints files
google-api-core==2.17.1
google-auth==2.14.1
grpcio==1.44.0
proto-plus==1.22.3
protobuf==4.25.8
4 changes: 2 additions & 2 deletions tests/integration/goldens/logging_internal/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
release_status = "Development Status :: 5 - Production/Stable"

dependencies = [
"google-api-core[grpc] >= 2.11.0, <3.0.0",
"google-api-core[grpc] >= 2.17.1, <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",
"grpcio >= 1.33.2, < 2.0.0",
"grpcio >= 1.44.0, < 2.0.0",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"proto-plus >= 1.22.3, <2.0.0",
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,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
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453)
# Add the minimum supported version of grpcio to constraints files
google-api-core==2.17.1
google-auth==2.14.1
grpcio==1.44.0
proto-plus==1.22.3
protobuf==4.25.8
4 changes: 2 additions & 2 deletions tests/integration/goldens/redis/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
release_status = "Development Status :: 5 - Production/Stable"

dependencies = [
"google-api-core[grpc] >= 2.11.0, <3.0.0",
"google-api-core[grpc] >= 2.17.1, <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",
"grpcio >= 1.33.2, < 2.0.0",
"grpcio >= 1.44.0, < 2.0.0",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"proto-plus >= 1.22.3, <2.0.0",
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# This constraints file is used to check that lower bounds
# are correct in setup.py
# List all library dependencies and extras in this file,
# 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
grpcio==1.44.0
proto-plus==1.22.3
protobuf==4.25.8
7 changes: 3 additions & 4 deletions tests/integration/goldens/redis/testing/constraints-3.9.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,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
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453)
# Add the minimum supported version of grpcio to constraints files
google-api-core==2.17.1
google-auth==2.14.1
grpcio==1.44.0
proto-plus==1.22.3
protobuf==4.25.8
4 changes: 2 additions & 2 deletions tests/integration/goldens/redis_selective/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
release_status = "Development Status :: 5 - Production/Stable"

dependencies = [
"google-api-core[grpc] >= 2.11.0, <3.0.0",
"google-api-core[grpc] >= 2.17.1, <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",
"grpcio >= 1.33.2, < 2.0.0",
"grpcio >= 1.44.0, < 2.0.0",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"proto-plus >= 1.22.3, <2.0.0",
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# This constraints file is used to check that lower bounds
# are correct in setup.py
# List all library dependencies and extras in this file,
# 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
grpcio==1.44.0
proto-plus==1.22.3
protobuf==4.25.8
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,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
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453)
# Add the minimum supported version of grpcio to constraints files
google-api-core==2.17.1
google-auth==2.14.1
grpcio==1.44.0
proto-plus==1.22.3
protobuf==4.25.8
Loading