|
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.10" |
| 35 | +DEFAULT_PYTHON_VERSION = "3.14" |
36 | 36 |
|
37 | 37 | UNIT_TEST_PYTHON_VERSIONS: List[str] = [ |
38 | 38 | "3.9", |
39 | 39 | "3.10", |
40 | 40 | "3.11", |
41 | 41 | "3.12", |
42 | 42 | "3.13", |
| 43 | + "3.14", |
43 | 44 | ] |
44 | 45 | UNIT_TEST_STANDARD_DEPENDENCIES = [ |
45 | 46 | "mock", |
|
58 | 59 | UNIT_TEST_EXTRAS: List[str] = [] |
59 | 60 | UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} |
60 | 61 |
|
61 | | -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.12"] |
| 62 | +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = [DEFAULT_PYTHON_VERSION] |
62 | 63 | SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ |
63 | 64 | "mock", |
64 | 65 | "pytest", |
|
79 | 80 | CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() |
80 | 81 |
|
81 | 82 | nox.options.sessions = [ |
82 | | - "unit", |
| 83 | + "unit-3.9", |
| 84 | + "unit-3.10", |
| 85 | + "unit-3.11", |
| 86 | + "unit-3.12", |
| 87 | + "unit-3.13", |
| 88 | + "unit-3.14", |
83 | 89 | "system", |
84 | 90 | "cover", |
85 | 91 | "lint", |
@@ -143,7 +149,7 @@ def format(session): |
143 | 149 | @nox.session(python=DEFAULT_PYTHON_VERSION) |
144 | 150 | def lint_setup_py(session): |
145 | 151 | """Verify that setup.py is valid (including RST check).""" |
146 | | - session.install("docutils", "pygments") |
| 152 | + session.install("setuptools", "docutils", "pygments") |
147 | 153 | session.run("python", "setup.py", "check", "--restructuredtext", "--strict") |
148 | 154 |
|
149 | 155 |
|
@@ -182,8 +188,8 @@ def install_unittest_dependencies(session, *constraints): |
182 | 188 | ) |
183 | 189 | def unit(session, protobuf_implementation): |
184 | 190 | # Install all test dependencies, then install this package in-place. |
185 | | - |
186 | | - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): |
| 191 | + py_version = tuple([int(v) for v in session.python.split(".")]) |
| 192 | + if protobuf_implementation == "cpp" and py_version >= (3, 11): |
187 | 193 | session.skip("cpp implementation is not supported in python 3.11+") |
188 | 194 |
|
189 | 195 | constraints_path = str( |
@@ -383,15 +389,16 @@ def docfx(session): |
383 | 389 | ) |
384 | 390 |
|
385 | 391 |
|
386 | | -@nox.session(python="3.13") |
| 392 | +@nox.session(python=DEFAULT_PYTHON_VERSION) |
387 | 393 | @nox.parametrize( |
388 | 394 | "protobuf_implementation", |
389 | 395 | ["python", "upb", "cpp"], |
390 | 396 | ) |
391 | 397 | def prerelease_deps(session, protobuf_implementation): |
392 | 398 | """Run all tests with prerelease versions of dependencies installed.""" |
393 | 399 |
|
394 | | - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): |
| 400 | + py_version = tuple([int(v) for v in session.python.split(".")]) |
| 401 | + if protobuf_implementation == "cpp" and py_version >= (3, 11): |
395 | 402 | session.skip("cpp implementation is not supported in python 3.11+") |
396 | 403 |
|
397 | 404 | # Install all dependencies |
|
0 commit comments