diff --git a/.kokoro/presubmit/system-3.7.cfg b/.kokoro/presubmit/system-3.10.cfg similarity index 100% rename from .kokoro/presubmit/system-3.7.cfg rename to .kokoro/presubmit/system-3.10.cfg diff --git a/noxfile.py b/noxfile.py index 1071be0ad..728e8c7cc 100644 --- a/noxfile.py +++ b/noxfile.py @@ -33,8 +33,33 @@ "docs/conf.py", ] +DEFAULT_PYTHON_VERSION = "3.10" +# TODO(https://github.com/googleapis/google-auth-library-python/issues/1787): +# Remove or restore testing for Python 3.7/3.8 +UNIT_TEST_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"] + +# Error if a python version is missing +nox.options.error_on_missing_interpreters = True + +# pypy will be run as a github action instead of through Kokoro +nox.options.sessions = [ + "lint", + "blacken", + "mypy", + # TODO(https://github.com/googleapis/google-auth-library-python/issues/1787): + # Remove or restore testing for Python 3.7/3.8 + "unit-3.9", + "unit-3.10", + "unit-3.11", + "unit-3.12", + "unit-3.13", + # cover must be last to avoid error `No data to report` + "cover", + "docs", +] + -@nox.session(python="3.8") +@nox.session(python=DEFAULT_PYTHON_VERSION) def lint(session): session.install( "flake8", "flake8-import-order", "docutils", CLICK_VERSION, BLACK_VERSION @@ -54,7 +79,7 @@ def lint(session): ) -@nox.session(python="3.8") +@nox.session(python=DEFAULT_PYTHON_VERSION) def blacken(session): """Run black. Format code to uniform standard. @@ -67,7 +92,7 @@ def blacken(session): session.run("black", *BLACK_PATHS) -@nox.session(python="3.8") +@nox.session(python=DEFAULT_PYTHON_VERSION) def mypy(session): """Verify type hints are mypy compatible.""" session.install("-e", ".") @@ -84,7 +109,7 @@ def mypy(session): session.run("mypy", "-p", "google", "-p", "tests", "-p", "tests_async") -@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]) +@nox.session(python=UNIT_TEST_PYTHON_VERSIONS) def unit(session): constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" @@ -102,7 +127,7 @@ def unit(session): ) -@nox.session(python="3.8") +@nox.session(python=DEFAULT_PYTHON_VERSION) def cover(session): session.install("-e", ".[testing]") session.run( diff --git a/system_tests/noxfile.py b/system_tests/noxfile.py index 56d39224d..8630f9ced 100644 --- a/system_tests/noxfile.py +++ b/system_tests/noxfile.py @@ -163,8 +163,8 @@ def configure_cloud_sdk(session, application_default_credentials, project=False) TEST_DEPENDENCIES_ASYNC = ["aiohttp", "pytest-asyncio", "nest-asyncio", "mock"] TEST_DEPENDENCIES_SYNC = ["pytest", "requests", "mock", "pyjwt"] -PYTHON_VERSIONS_ASYNC = ["3.7"] -PYTHON_VERSIONS_SYNC = ["3.7"] +PYTHON_VERSIONS_ASYNC = ["3.10"] +PYTHON_VERSIONS_SYNC = ["3.10"] def default(session, *test_paths):