Skip to content

Commit deaed26

Browse files
1 parent 84257b2 commit deaed26

File tree

4 files changed

+12
-132
lines changed

4 files changed

+12
-132
lines changed

‎.github/workflows/lint.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Setup Python
1313
uses: actions/setup-python@v5
1414
with:
15-
python-version: "3.13"
15+
python-version: "3.10"
1616
- name: Install nox
1717
run: |
1818
python -m pip install --upgrade setuptools pip wheel

‎.github/workflows/unittest.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
- name: Setup Python
4646
uses: actions/setup-python@v5
4747
with:
48-
python-version: "3.13"
48+
python-version: "3.10"
4949
- name: Install coverage
5050
run: |
5151
python -m pip install --upgrade setuptools pip wheel
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Only run this nox session.
4+
env_vars: {
5+
key: "NOX_SESSION"
6+
value: "system-3.10"
7+
}

‎noxfile.py‎

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

35-
DEFAULT_PYTHON_VERSION = "3.8"
35+
DEFAULT_PYTHON_VERSION = "3.10"
3636

3737
UNIT_TEST_PYTHON_VERSIONS: List[str] = [
3838
"3.7",
@@ -58,7 +58,7 @@
5858
UNIT_TEST_EXTRAS: List[str] = []
5959
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}
6060

61-
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8"]
61+
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.10"]
6262
SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [
6363
"mock",
6464
"pytest",
@@ -78,20 +78,12 @@
7878
"unit",
7979
"system",
8080
"mypy",
81-
"mypy",
82-
"mypy",
83-
"mypy",
84-
"mypy",
8581
"cover",
8682
"lint",
8783
"lint_setup_py",
8884
"blacken",
8985
"docs",
9086
"doctests",
91-
"doctests",
92-
"doctests",
93-
"doctests",
94-
"doctests",
9587
"docfx",
9688
"format",
9789
]
@@ -162,70 +154,6 @@ def mypy(session):
162154
session.run("mypy", "-p", "google.cloud.datastore")
163155

164156

165-
@nox.session(python=DEFAULT_PYTHON_VERSION)
166-
def mypy(session):
167-
"""Verify type hints are mypy compatible."""
168-
session.install("-e", ".")
169-
# Exclude types-protobuf==4.24.0.20240106
170-
# See https://github.com/python/typeshed/issues/11254
171-
session.install(
172-
"mypy",
173-
"types-setuptools",
174-
"types-mock",
175-
"types-protobuf!=4.24.0.20240106",
176-
"types-requests",
177-
)
178-
session.run("mypy", "-p", "google.cloud.datastore")
179-
180-
181-
@nox.session(python=DEFAULT_PYTHON_VERSION)
182-
def mypy(session):
183-
"""Verify type hints are mypy compatible."""
184-
session.install("-e", ".")
185-
# Exclude types-protobuf==4.24.0.20240106
186-
# See https://github.com/python/typeshed/issues/11254
187-
session.install(
188-
"mypy",
189-
"types-setuptools",
190-
"types-mock",
191-
"types-protobuf!=4.24.0.20240106",
192-
"types-requests",
193-
)
194-
session.run("mypy", "-p", "google.cloud.datastore")
195-
196-
197-
@nox.session(python=DEFAULT_PYTHON_VERSION)
198-
def mypy(session):
199-
"""Verify type hints are mypy compatible."""
200-
session.install("-e", ".")
201-
# Exclude types-protobuf==4.24.0.20240106
202-
# See https://github.com/python/typeshed/issues/11254
203-
session.install(
204-
"mypy",
205-
"types-setuptools",
206-
"types-mock",
207-
"types-protobuf!=4.24.0.20240106",
208-
"types-requests",
209-
)
210-
session.run("mypy", "-p", "google.cloud.datastore")
211-
212-
213-
@nox.session(python=DEFAULT_PYTHON_VERSION)
214-
def mypy(session):
215-
"""Verify type hints are mypy compatible."""
216-
session.install("-e", ".")
217-
# Exclude types-protobuf==4.24.0.20240106
218-
# See https://github.com/python/typeshed/issues/11254
219-
session.install(
220-
"mypy",
221-
"types-setuptools",
222-
"types-mock",
223-
"types-protobuf!=4.24.0.20240106",
224-
"types-requests",
225-
)
226-
session.run("mypy", "-p", "google.cloud.datastore")
227-
228-
229157
@nox.session(python=DEFAULT_PYTHON_VERSION)
230158
def lint_setup_py(session):
231159
"""Verify that setup.py is valid (including RST check)."""
@@ -357,22 +285,6 @@ def system(session, disable_grpc):
357285

358286
install_systemtest_dependencies(session, "-c", constraints_path)
359287

360-
env = {}
361-
if disable_grpc:
362-
env["GOOGLE_CLOUD_DISABLE_GRPC"] = "True"
363-
364-
env = {}
365-
if disable_grpc:
366-
env["GOOGLE_CLOUD_DISABLE_GRPC"] = "True"
367-
368-
env = {}
369-
if disable_grpc:
370-
env["GOOGLE_CLOUD_DISABLE_GRPC"] = "True"
371-
372-
env = {}
373-
if disable_grpc:
374-
env["GOOGLE_CLOUD_DISABLE_GRPC"] = "True"
375-
376288
env = {}
377289
if disable_grpc:
378290
env["GOOGLE_CLOUD_DISABLE_GRPC"] = "True"
@@ -453,50 +365,11 @@ def doctests(session):
453365
session.install("mock", "pytest", "sphinx", "google-cloud-testutils")
454366
session.install("-e", ".")
455367

456-
env = {}
457-
if disable_grpc:
458-
env["GOOGLE_CLOUD_DISABLE_GRPC"] = "True"
459-
460-
env = {}
461-
if disable_grpc:
462-
env["GOOGLE_CLOUD_DISABLE_GRPC"] = "True"
463-
464-
env = {}
465-
if disable_grpc:
466-
env["GOOGLE_CLOUD_DISABLE_GRPC"] = "True"
467-
468-
env = {}
469-
if disable_grpc:
470-
env["GOOGLE_CLOUD_DISABLE_GRPC"] = "True"
471-
472-
# Run py.test against the system tests.
473-
session.run("py.test", "tests/doctests.py")
474-
475-
476-
@nox.session(python="3.13")
477-
def doctests(session):
478-
# Install all test dependencies, then install this package into the
479-
# virtualenv's dist-packages.
480-
session.install("mock", "pytest", "sphinx", "google-cloud-testutils")
481-
session.install("-e", ".")
482-
483-
env = {}
484-
if disable_grpc:
485-
env["GOOGLE_CLOUD_DISABLE_GRPC"] = "True"
486-
487-
env = {}
488-
if disable_grpc:
489-
env["GOOGLE_CLOUD_DISABLE_GRPC"] = "True"
490-
491-
env = {}
492-
if disable_grpc:
493-
env["GOOGLE_CLOUD_DISABLE_GRPC"] = "True"
494-
495368
# Run py.test against the system tests.
496369
session.run("py.test", "tests/doctests.py")
497370

498371

499-
@nox.session(python="3.13")
372+
@nox.session(python="3.10")
500373
def docfx(session):
501374
"""Build the docfx yaml files for this library."""
502375

0 commit comments

Comments
 (0)