From 6d907479079b03e774e29e51f3229dfc1f5b114d Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 25 Feb 2025 17:30:56 +0000 Subject: [PATCH] build: clean up generated noxfile --- gapic/templates/noxfile.py.j2 | 9 ++++----- tests/integration/goldens/asset/noxfile.py | 9 ++++----- tests/integration/goldens/credentials/noxfile.py | 9 ++++----- tests/integration/goldens/eventarc/noxfile.py | 9 ++++----- tests/integration/goldens/logging/noxfile.py | 9 ++++----- tests/integration/goldens/logging_internal/noxfile.py | 9 ++++----- tests/integration/goldens/redis/noxfile.py | 9 ++++----- tests/integration/goldens/redis_selective/noxfile.py | 9 ++++----- 8 files changed, 32 insertions(+), 40 deletions(-) diff --git a/gapic/templates/noxfile.py.j2 b/gapic/templates/noxfile.py.j2 index 18505d5434..fca28de834 100644 --- a/gapic/templates/noxfile.py.j2 +++ b/gapic/templates/noxfile.py.j2 @@ -29,7 +29,7 @@ PACKAGE_NAME = '{{ api.naming.warehouse_package_name }}' BLACK_VERSION = "black==22.3.0" BLACK_PATHS = ["docs", "google", "tests", "samples", "noxfile.py", "setup.py"] -DEFAULT_PYTHON_VERSION = "3.13" +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] nox.sessions = [ "unit", @@ -51,7 +51,7 @@ nox.sessions = [ def unit(session, protobuf_implementation): """Run the unit test suite.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and float(session.python) > 3.10: session.skip("cpp implementation is not supported in python 3.11+") session.install('coverage', 'pytest', 'pytest-cov', 'pytest-asyncio', 'asyncmock; python_version < "3.8"') @@ -85,7 +85,7 @@ def unit(session, protobuf_implementation): def prerelease_deps(session, protobuf_implementation): """Run the unit test suite against pre-release versions of dependencies.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and float(session.python) > 3.10: session.skip("cpp implementation is not supported in python 3.11+") # Install test environment dependencies @@ -120,8 +120,7 @@ def prerelease_deps(session, protobuf_implementation): "googleapis-common-protos", "google-api-core", "google-auth", - # Exclude grpcio!=1.67.0rc1 which does not support python 3.13 - "grpcio!=1.67.0rc1", + "grpcio", "grpcio-status", "protobuf", "proto-plus", diff --git a/tests/integration/goldens/asset/noxfile.py b/tests/integration/goldens/asset/noxfile.py index 2ca01db629..9fc1f1b8fe 100755 --- a/tests/integration/goldens/asset/noxfile.py +++ b/tests/integration/goldens/asset/noxfile.py @@ -40,7 +40,7 @@ BLACK_VERSION = "black==22.3.0" BLACK_PATHS = ["docs", "google", "tests", "samples", "noxfile.py", "setup.py"] -DEFAULT_PYTHON_VERSION = "3.13" +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] nox.sessions = [ "unit", @@ -62,7 +62,7 @@ def unit(session, protobuf_implementation): """Run the unit test suite.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and float(session.python) > 3.10: session.skip("cpp implementation is not supported in python 3.11+") session.install('coverage', 'pytest', 'pytest-cov', 'pytest-asyncio', 'asyncmock; python_version < "3.8"') @@ -95,7 +95,7 @@ def unit(session, protobuf_implementation): def prerelease_deps(session, protobuf_implementation): """Run the unit test suite against pre-release versions of dependencies.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and float(session.python) > 3.10: session.skip("cpp implementation is not supported in python 3.11+") # Install test environment dependencies @@ -130,8 +130,7 @@ def prerelease_deps(session, protobuf_implementation): "googleapis-common-protos", "google-api-core", "google-auth", - # Exclude grpcio!=1.67.0rc1 which does not support python 3.13 - "grpcio!=1.67.0rc1", + "grpcio", "grpcio-status", "protobuf", "proto-plus", diff --git a/tests/integration/goldens/credentials/noxfile.py b/tests/integration/goldens/credentials/noxfile.py index 3b9e7366bb..119817e5f9 100755 --- a/tests/integration/goldens/credentials/noxfile.py +++ b/tests/integration/goldens/credentials/noxfile.py @@ -40,7 +40,7 @@ BLACK_VERSION = "black==22.3.0" BLACK_PATHS = ["docs", "google", "tests", "samples", "noxfile.py", "setup.py"] -DEFAULT_PYTHON_VERSION = "3.13" +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] nox.sessions = [ "unit", @@ -62,7 +62,7 @@ def unit(session, protobuf_implementation): """Run the unit test suite.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and float(session.python) > 3.10: session.skip("cpp implementation is not supported in python 3.11+") session.install('coverage', 'pytest', 'pytest-cov', 'pytest-asyncio', 'asyncmock; python_version < "3.8"') @@ -95,7 +95,7 @@ def unit(session, protobuf_implementation): def prerelease_deps(session, protobuf_implementation): """Run the unit test suite against pre-release versions of dependencies.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and float(session.python) > 3.10: session.skip("cpp implementation is not supported in python 3.11+") # Install test environment dependencies @@ -130,8 +130,7 @@ def prerelease_deps(session, protobuf_implementation): "googleapis-common-protos", "google-api-core", "google-auth", - # Exclude grpcio!=1.67.0rc1 which does not support python 3.13 - "grpcio!=1.67.0rc1", + "grpcio", "grpcio-status", "protobuf", "proto-plus", diff --git a/tests/integration/goldens/eventarc/noxfile.py b/tests/integration/goldens/eventarc/noxfile.py index 685faed09b..ba82ee1ba9 100755 --- a/tests/integration/goldens/eventarc/noxfile.py +++ b/tests/integration/goldens/eventarc/noxfile.py @@ -40,7 +40,7 @@ BLACK_VERSION = "black==22.3.0" BLACK_PATHS = ["docs", "google", "tests", "samples", "noxfile.py", "setup.py"] -DEFAULT_PYTHON_VERSION = "3.13" +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] nox.sessions = [ "unit", @@ -62,7 +62,7 @@ def unit(session, protobuf_implementation): """Run the unit test suite.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and float(session.python) > 3.10: session.skip("cpp implementation is not supported in python 3.11+") session.install('coverage', 'pytest', 'pytest-cov', 'pytest-asyncio', 'asyncmock; python_version < "3.8"') @@ -95,7 +95,7 @@ def unit(session, protobuf_implementation): def prerelease_deps(session, protobuf_implementation): """Run the unit test suite against pre-release versions of dependencies.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and float(session.python) > 3.10: session.skip("cpp implementation is not supported in python 3.11+") # Install test environment dependencies @@ -130,8 +130,7 @@ def prerelease_deps(session, protobuf_implementation): "googleapis-common-protos", "google-api-core", "google-auth", - # Exclude grpcio!=1.67.0rc1 which does not support python 3.13 - "grpcio!=1.67.0rc1", + "grpcio", "grpcio-status", "protobuf", "proto-plus", diff --git a/tests/integration/goldens/logging/noxfile.py b/tests/integration/goldens/logging/noxfile.py index 8d723fa938..f50952a8cf 100755 --- a/tests/integration/goldens/logging/noxfile.py +++ b/tests/integration/goldens/logging/noxfile.py @@ -40,7 +40,7 @@ BLACK_VERSION = "black==22.3.0" BLACK_PATHS = ["docs", "google", "tests", "samples", "noxfile.py", "setup.py"] -DEFAULT_PYTHON_VERSION = "3.13" +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] nox.sessions = [ "unit", @@ -62,7 +62,7 @@ def unit(session, protobuf_implementation): """Run the unit test suite.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and float(session.python) > 3.10: session.skip("cpp implementation is not supported in python 3.11+") session.install('coverage', 'pytest', 'pytest-cov', 'pytest-asyncio', 'asyncmock; python_version < "3.8"') @@ -95,7 +95,7 @@ def unit(session, protobuf_implementation): def prerelease_deps(session, protobuf_implementation): """Run the unit test suite against pre-release versions of dependencies.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and float(session.python) > 3.10: session.skip("cpp implementation is not supported in python 3.11+") # Install test environment dependencies @@ -130,8 +130,7 @@ def prerelease_deps(session, protobuf_implementation): "googleapis-common-protos", "google-api-core", "google-auth", - # Exclude grpcio!=1.67.0rc1 which does not support python 3.13 - "grpcio!=1.67.0rc1", + "grpcio", "grpcio-status", "protobuf", "proto-plus", diff --git a/tests/integration/goldens/logging_internal/noxfile.py b/tests/integration/goldens/logging_internal/noxfile.py index 8d723fa938..f50952a8cf 100755 --- a/tests/integration/goldens/logging_internal/noxfile.py +++ b/tests/integration/goldens/logging_internal/noxfile.py @@ -40,7 +40,7 @@ BLACK_VERSION = "black==22.3.0" BLACK_PATHS = ["docs", "google", "tests", "samples", "noxfile.py", "setup.py"] -DEFAULT_PYTHON_VERSION = "3.13" +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] nox.sessions = [ "unit", @@ -62,7 +62,7 @@ def unit(session, protobuf_implementation): """Run the unit test suite.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and float(session.python) > 3.10: session.skip("cpp implementation is not supported in python 3.11+") session.install('coverage', 'pytest', 'pytest-cov', 'pytest-asyncio', 'asyncmock; python_version < "3.8"') @@ -95,7 +95,7 @@ def unit(session, protobuf_implementation): def prerelease_deps(session, protobuf_implementation): """Run the unit test suite against pre-release versions of dependencies.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and float(session.python) > 3.10: session.skip("cpp implementation is not supported in python 3.11+") # Install test environment dependencies @@ -130,8 +130,7 @@ def prerelease_deps(session, protobuf_implementation): "googleapis-common-protos", "google-api-core", "google-auth", - # Exclude grpcio!=1.67.0rc1 which does not support python 3.13 - "grpcio!=1.67.0rc1", + "grpcio", "grpcio-status", "protobuf", "proto-plus", diff --git a/tests/integration/goldens/redis/noxfile.py b/tests/integration/goldens/redis/noxfile.py index 755a3329f3..2e308e51cc 100755 --- a/tests/integration/goldens/redis/noxfile.py +++ b/tests/integration/goldens/redis/noxfile.py @@ -40,7 +40,7 @@ BLACK_VERSION = "black==22.3.0" BLACK_PATHS = ["docs", "google", "tests", "samples", "noxfile.py", "setup.py"] -DEFAULT_PYTHON_VERSION = "3.13" +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] nox.sessions = [ "unit", @@ -62,7 +62,7 @@ def unit(session, protobuf_implementation): """Run the unit test suite.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and float(session.python) > 3.10: session.skip("cpp implementation is not supported in python 3.11+") session.install('coverage', 'pytest', 'pytest-cov', 'pytest-asyncio', 'asyncmock; python_version < "3.8"') @@ -95,7 +95,7 @@ def unit(session, protobuf_implementation): def prerelease_deps(session, protobuf_implementation): """Run the unit test suite against pre-release versions of dependencies.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and float(session.python) > 3.10: session.skip("cpp implementation is not supported in python 3.11+") # Install test environment dependencies @@ -130,8 +130,7 @@ def prerelease_deps(session, protobuf_implementation): "googleapis-common-protos", "google-api-core", "google-auth", - # Exclude grpcio!=1.67.0rc1 which does not support python 3.13 - "grpcio!=1.67.0rc1", + "grpcio", "grpcio-status", "protobuf", "proto-plus", diff --git a/tests/integration/goldens/redis_selective/noxfile.py b/tests/integration/goldens/redis_selective/noxfile.py index 755a3329f3..2e308e51cc 100755 --- a/tests/integration/goldens/redis_selective/noxfile.py +++ b/tests/integration/goldens/redis_selective/noxfile.py @@ -40,7 +40,7 @@ BLACK_VERSION = "black==22.3.0" BLACK_PATHS = ["docs", "google", "tests", "samples", "noxfile.py", "setup.py"] -DEFAULT_PYTHON_VERSION = "3.13" +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] nox.sessions = [ "unit", @@ -62,7 +62,7 @@ def unit(session, protobuf_implementation): """Run the unit test suite.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and float(session.python) > 3.10: session.skip("cpp implementation is not supported in python 3.11+") session.install('coverage', 'pytest', 'pytest-cov', 'pytest-asyncio', 'asyncmock; python_version < "3.8"') @@ -95,7 +95,7 @@ def unit(session, protobuf_implementation): def prerelease_deps(session, protobuf_implementation): """Run the unit test suite against pre-release versions of dependencies.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and float(session.python) > 3.10: session.skip("cpp implementation is not supported in python 3.11+") # Install test environment dependencies @@ -130,8 +130,7 @@ def prerelease_deps(session, protobuf_implementation): "googleapis-common-protos", "google-api-core", "google-auth", - # Exclude grpcio!=1.67.0rc1 which does not support python 3.13 - "grpcio!=1.67.0rc1", + "grpcio", "grpcio-status", "protobuf", "proto-plus",