Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.

Commit 1be9a4e

Browse files
committed
updated noxfile to avoid 3.7 and 3.8
1 parent 4983639 commit 1be9a4e

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[mypy]
2-
python_version = 3.8
2+
python_version = 3.13
33
namespace_packages = True

noxfile.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
ISORT_VERSION = "isort==5.11.0"
3434
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
3535

36-
DEFAULT_PYTHON_VERSION = "3.8"
36+
DEFAULT_PYTHON_VERSION = "3.13"
3737

3838
UNIT_TEST_PYTHON_VERSIONS: List[str] = [
3939
"3.7",
@@ -61,7 +61,7 @@
6161
UNIT_TEST_EXTRAS: List[str] = []
6262
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}
6363

64-
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.7"]
64+
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9"]
6565
SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [
6666
"mock",
6767
"pytest",
@@ -79,7 +79,11 @@
7979
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
8080

8181
nox.options.sessions = [
82-
"unit",
82+
"unit-3.9",
83+
"unit-3.10",
84+
"unit-3.11",
85+
"unit-3.12",
86+
"unit-3.13",
8387
"system_emulated",
8488
"system",
8589
"mypy",
@@ -170,7 +174,7 @@ def mypy(session):
170174
@nox.session(python=DEFAULT_PYTHON_VERSION)
171175
def lint_setup_py(session):
172176
"""Verify that setup.py is valid (including RST check)."""
173-
session.install("docutils", "pygments")
177+
session.install("setuptools", "docutils", "pygments")
174178
session.run("python", "setup.py", "check", "--restructuredtext", "--strict")
175179

176180

@@ -210,7 +214,8 @@ def install_unittest_dependencies(session, *constraints):
210214
def unit(session, protobuf_implementation):
211215
# Install all test dependencies, then install this package in-place.
212216

213-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
217+
py_version = tuple([int(v) for v in session.python.split(".")])
218+
if protobuf_implementation == "cpp" and py_version >= (3, 11):
214219
session.skip("cpp implementation is not supported in python 3.11+")
215220

216221
constraints_path = str(
@@ -469,7 +474,8 @@ def docfx(session):
469474
def prerelease_deps(session, protobuf_implementation):
470475
"""Run all tests with prerelease versions of dependencies installed."""
471476

472-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
477+
py_version = tuple([int(v) for v in session.python.split(".")])
478+
if protobuf_implementation == "cpp" and py_version >= (3, 11):
473479
session.skip("cpp implementation is not supported in python 3.11+")
474480

475481
# Install all dependencies

0 commit comments

Comments
 (0)