|
31 | 31 | if os.path.isdir("samples"): |
32 | 32 | LINT_PATHS.append("samples") |
33 | 33 |
|
| 34 | + |
| 35 | +# TODO: Remove 3.7, 3.8, 3.9 once we drop support for them. |
34 | 36 | ALL_PYTHON = [ |
| 37 | + "3.7", |
| 38 | + "3.8", |
| 39 | + "3.9", |
35 | 40 | "3.10", |
36 | 41 | "3.11", |
37 | 42 | "3.12", |
|
65 | 70 | UNIT_TEST_EXTRAS: List[str] = [] |
66 | 71 | UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} |
67 | 72 |
|
68 | | -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON |
69 | 73 | SYSTEM_TEST_STANDARD_DEPENDENCIES = [ |
70 | 74 | "spannerlib-python", |
71 | 75 | "mock", |
|
97 | 101 | @nox.session(python=ALL_PYTHON) |
98 | 102 | def mypy(session): |
99 | 103 | """Run the type checker.""" |
| 104 | + if session.python in ("3.7", "3.8", "3.9"): |
| 105 | + session.skip("Python versions < 3.10 are no longer supported") |
| 106 | + |
100 | 107 | session.install( |
101 | 108 | # TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): Use the latest version of mypy |
102 | 109 | "mypy<1.16.0", |
@@ -235,6 +242,8 @@ def install_unittest_dependencies(session, *constraints): |
235 | 242 | @nox.session(python=ALL_PYTHON) |
236 | 243 | def unit(session): |
237 | 244 | """Run the unit test suite.""" |
| 245 | + if session.python in ("3.7", "3.8", "3.9"): |
| 246 | + session.skip("Python versions < 3.10 are no longer supported") |
238 | 247 |
|
239 | 248 | constraints_path = str( |
240 | 249 | CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" |
@@ -283,9 +292,12 @@ def install_systemtest_dependencies(session, *constraints): |
283 | 292 | session.install("-e", ".", *constraints) |
284 | 293 |
|
285 | 294 |
|
286 | | -@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS) |
| 295 | +@nox.session(python=ALL_PYTHON) |
287 | 296 | def system(session): |
288 | 297 | """Run the system test suite.""" |
| 298 | + if session.python in ("3.7", "3.8", "3.9"): |
| 299 | + session.skip("Python versions < 3.10 are no longer supported") |
| 300 | + |
289 | 301 | constraints_path = str( |
290 | 302 | CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" |
291 | 303 | ) |
|
0 commit comments