Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
2 changes: 1 addition & 1 deletion .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ branchProtectionRules:
requiresStrictStatusChecks: true
requiredStatusCheckContexts:
- 'Kokoro'
- 'Kokoro system-3.8'
- 'Kokoro system-3.12'
- 'cla/google'
- 'Samples - Lint'
- 'Samples - Python 3.8'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Only run a subset of all nox sessions
env_vars: {
key: "NOX_SESSION"
value: "unit-3.8 unit-3.12 system-3.8"
value: "unit-3.9 unit-3.12 system-3.12"
}

env_vars: {
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/presubmit/presubmit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# Only run a subset of all nox sessions
env_vars: {
key: "NOX_SESSION"
value: "unit-3.8 unit-3.12 cover docs docfx"
value: "unit-3.9 unit-3.12 cover docs docfx"
}
7 changes: 7 additions & 0 deletions .kokoro/presubmit/system-3.12.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Only run this nox session.
env_vars: {
key: "NOX_SESSION"
value: "system-3.12"
}
19 changes: 14 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
ISORT_VERSION = "isort==5.11.0"
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

DEFAULT_PYTHON_VERSION = "3.8"
DEFAULT_PYTHON_VERSION = "3.12"

DEFAULT_MOCK_SERVER_TESTS_PYTHON_VERSION = "3.12"
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.12"]

UNIT_TEST_PYTHON_VERSIONS: List[str] = [
"3.7",
"3.8",
Expand All @@ -60,7 +62,6 @@
UNIT_TEST_EXTRAS: List[str] = []
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}

SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8"]
SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [
"mock",
"pytest",
Expand All @@ -77,7 +78,13 @@
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()

nox.options.sessions = [
"unit",
# TODO(https://github.com/googleapis/python-spanner/issues/1392):
# 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",
"system",
"cover",
"lint",
Expand Down Expand Up @@ -108,7 +115,9 @@ def lint(session):
session.run("flake8", "google", "tests")


@nox.session(python=DEFAULT_PYTHON_VERSION)
# Use a python runtime which is available in the owlbot post processor here
# https://github.com/googleapis/synthtool/blob/master/docker/owlbot/python/Dockerfile
@nox.session(python=["3.10", DEFAULT_PYTHON_VERSION])
def blacken(session):
"""Run black. Format code to uniform standard."""
session.install(BLACK_VERSION)
Expand Down Expand Up @@ -141,7 +150,7 @@ def format(session):
@nox.session(python=DEFAULT_PYTHON_VERSION)
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.install("docutils", "pygments")
session.install("docutils", "pygments", "setuptools>=79.0.1")
session.run("python", "setup.py", "check", "--restructuredtext", "--strict")


Expand Down
4 changes: 3 additions & 1 deletion owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,6 @@ def get_staging_dirs(

python.py_samples()

s.shell.run(["nox", "-s", "blacken"], hide_output=False)
# Use a python runtime which is available in the owlbot post processor here
# https://github.com/googleapis/synthtool/blob/master/docker/owlbot/python/Dockerfile
s.shell.run(["nox", "-s", "blacken-3.10"], hide_output=False)
Loading