8000 [DRAFT] chore: testing constraints target minimum supported versions by daniel-sanche · Pull Request #2590 · googleapis/gapic-generator-python · GitHub
[go: up one dir, main page]

Skip to content
Draft
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
2 changes: 1 addition & 1 deletion gapic/templates/setup.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion gapic/templates/testing/constraints-3.9.txt.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,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
Expand Down
21 changes: 14 additions & 7 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,13 +357,20 @@ 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 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)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not super happy with this solution. But the other option is using a separate constraints file for async_rest, and that doesn't seem great either.


# Exclude `google-auth==2.40.0` which contains a regression
# https://github.com/googleapis/gapic-generator-python/issues/2385
session.install(
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/goldens/asset/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/goldens/credentials/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/goldens/eventarc/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/goldens/logging/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/goldens/logging_internal/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/goldens/redis/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/goldens/redis_selective/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
0