|
32 | 32 | ISORT_VERSION = "isort==5.11.0" |
33 | 33 | LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] |
34 | 34 |
|
35 | | -DEFAULT_PYTHON_VERSION = "3.8" |
| 35 | +DEFAULT_PYTHON_VERSION = "3.12" |
36 | 36 |
|
37 | 37 | DEFAULT_MOCK_SERVER_TESTS_PYTHON_VERSION = "3.12" |
| 38 | +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.12"] |
| 39 | + |
38 | 40 | UNIT_TEST_PYTHON_VERSIONS: List[str] = [ |
39 | 41 | "3.7", |
40 | 42 | "3.8", |
|
60 | 62 | UNIT_TEST_EXTRAS: List[str] = [] |
61 | 63 | UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} |
62 | 64 |
|
63 | | -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8"] |
64 | 65 | SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ |
65 | 66 | "mock", |
66 | 67 | "pytest", |
|
77 | 78 | CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() |
78 | 79 |
|
79 | 80 | nox.options.sessions = [ |
80 | | - "unit", |
| 81 | + # TODO(https://github.com/googleapis/python-spanner/issues/1392): |
| 82 | + # Remove or restore testing for Python 3.7/3.8 |
| 83 | + "unit-3.9", |
| 84 | + "unit-3.10", |
| 85 | + "unit-3.11", |
| 86 | + "unit-3.12", |
| 87 | + "unit-3.13", |
81 | 88 | "system", |
82 | 89 | "cover", |
83 | 90 | "lint", |
@@ -108,7 +115,9 @@ def lint(session): |
108 | 115 | session.run("flake8", "google", "tests") |
109 | 116 |
|
110 | 117 |
|
111 | | -@nox.session(python=DEFAULT_PYTHON_VERSION) |
| 118 | +# Use a python runtime which is available in the owlbot post processor here |
| 119 | +# https://github.com/googleapis/synthtool/blob/master/docker/owlbot/python/Dockerfile |
| 120 | +@nox.session(python=["3.10", DEFAULT_PYTHON_VERSION]) |
112 | 121 | def blacken(session): |
113 | 122 | """Run black. Format code to uniform standard.""" |
114 | 123 | session.install(BLACK_VERSION) |
@@ -141,7 +150,7 @@ def format(session): |
141 | 150 | @nox.session(python=DEFAULT_PYTHON_VERSION) |
142 | 151 | def lint_setup_py(session): |
143 | 152 | """Verify that setup.py is valid (including RST check).""" |
144 | | - session.install("docutils", "pygments") |
| 153 | + session.install("docutils", "pygments", "setuptools>=79.0.1") |
145 | 154 | session.run("python", "setup.py", "check", "--restructuredtext", "--strict") |
146 | 155 |
|
147 | 156 |
|
@@ -321,6 +330,9 @@ def system(session, protobuf_implementation, database_dialect): |
321 | 330 | "Only run system tests on real Spanner with one protobuf implementation to speed up the build" |
322 | 331 | ) |
323 | 332 |
|
| 333 | + if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): |
| 334 | + session.skip("cpp implementation is not supported in python 3.11+") |
| 335 | + |
324 | 336 | # Install pyopenssl for mTLS testing. |
325 | 337 | if os.environ.get("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true": |
326 | 338 | session.install("pyopenssl") |
|
0 commit comments