Skip to content

Commit 585a306

Browse files
committed
feat: Add Python 3.7, 3.8, and 3.9 to ALL_PYTHON in noxfile.py while skipping mypy, unit, and system test sessions for these older versions.
1 parent 42da586 commit 585a306

File tree

1 file changed

+14
-2
lines changed
  • packages/google-cloud-spanner-dbapi-driver

1 file changed

+14
-2
lines changed

packages/google-cloud-spanner-dbapi-driver/noxfile.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@
3131
if os.path.isdir("samples"):
3232
LINT_PATHS.append("samples")
3333

34+
35+
# TODO: Remove 3.7, 3.8, 3.9 once we drop support for them.
3436
ALL_PYTHON = [
37+
"3.7",
38+
"3.8",
39+
"3.9",
3540
"3.10",
3641
"3.11",
3742
"3.12",
@@ -65,7 +70,6 @@
6570
UNIT_TEST_EXTRAS: List[str] = []
6671
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}
6772

68-
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON
6973
SYSTEM_TEST_STANDARD_DEPENDENCIES = [
7074
"spannerlib-python",
7175
"mock",
@@ -97,6 +101,9 @@
97101
@nox.session(python=ALL_PYTHON)
98102
def mypy(session):
99103
"""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+
100107
session.install(
101108
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): Use the latest version of mypy
102109
"mypy<1.16.0",
@@ -235,6 +242,8 @@ def install_unittest_dependencies(session, *constraints):
235242
@nox.session(python=ALL_PYTHON)
236243
def unit(session):
237244
"""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")
238247

239248
constraints_path = str(
240249
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
@@ -283,9 +292,12 @@ def install_systemtest_dependencies(session, *constraints):
283292
session.install("-e", ".", *constraints)
284293

285294

286-
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
295+
@nox.session(python=ALL_PYTHON)
287296
def system(session):
288297
"""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+
289301
constraints_path = str(
290302
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
291303
)

0 commit comments

Comments
 (0)