Skip to content

Commit 882bec9

Browse files
committed
fix build
1 parent 5e833ae commit 882bec9

5 files changed

Lines changed: 15 additions & 38 deletions

File tree

packages/google-cloud-spanner/noxfile.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,9 @@ def install_unittest_dependencies(session, *constraints):
220220
def unit(session, protobuf_implementation):
221221
# Install all test dependencies, then install this package in-place.
222222

223-
if protobuf_implementation == "cpp" and session.python in (
224-
"3.11",
225-
"3.12",
226-
"3.13",
227-
"3.14",
228-
):
223+
# Install all test dependencies, then install this package in-place.
224+
py_version = tuple([int(v) for v in session.python.split(".")])
225+
if protobuf_implementation == "cpp" and py_version >= (3, 11):
229226
session.skip("cpp implementation is not supported in python 3.11+")
230227

231228
constraints_path = str(
@@ -363,12 +360,8 @@ def system(session, protobuf_implementation, database_dialect):
363360
"Only run system tests on real Spanner with one protobuf implementation to speed up the build"
364361
)
365362

366-
if protobuf_implementation == "cpp" and session.python in (
367-
"3.11",
368-
"3.12",
369-
"3.13",
370-
"3.14",
371-
):
363+
py_version = tuple([int(v) for v in session.python.split(".")])
364+
if protobuf_implementation == "cpp" and py_version >= (3, 11):
372365
session.skip("cpp implementation is not supported in python 3.11+")
373366

374367
# Install pyopenssl for mTLS testing.

packages/googleapis-common-protos/noxfile.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,8 @@ def install_unittest_dependencies(session, *constraints):
216216
def unit(session, protobuf_implementation):
217217
# Install all test dependencies, then install this package in-place.
218218

219-
if protobuf_implementation == "cpp" and session.python in (
220-
"3.11",
221-
"3.12",
222-
"3.13",
223-
"3.14",
224-
):
219+
py_version = tuple([int(v) for v in session.python.split(".")])
220+
if protobuf_implementation == "cpp" and py_version >= (3, 11):
225221
session.skip("cpp implementation is not supported in python 3.11+")
226222

227223
constraints_path = str(

packages/grpc-google-iam-v1/noxfile.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,8 @@ def install_unittest_dependencies(session, *constraints):
216216
def unit(session, protobuf_implementation):
217217
# Install all test dependencies, then install this package in-place.
218218

219-
if protobuf_implementation == "cpp" and session.python in (
220-
"3.11",
221-
"3.12",
222-
"3.13",
223-
"3.14",
224-
):
219+
py_version = tuple([int(v) for v in session.python.split(".")])
220+
if protobuf_implementation == "cpp" and py_version >= (3, 11):
225221
session.skip("cpp implementation is not supported in python 3.11+")
226222

227223
constraints_path = str(

packages/proto-plus/noxfile.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,9 @@
4848
def unit(session, implementation):
4949
"""Run the unit test suite."""
5050

51-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
52-
# Remove this check once support for Protobuf 3.x is dropped.
53-
if implementation == "cpp" and session.python in (
54-
"3.11",
55-
"3.12",
56-
"3.13",
57-
"3.14",
58-
):
51+
# Install all test dependencies, then install this package in-place.
52+
py_version = tuple([int(v) for v in session.python.split(".")])
53+
if implementation == "cpp" and py_version >= (3, 11):
5954
session.skip("cpp implementation is not supported in python 3.11+")
6055

6156
constraints_path = str(

packages/sqlalchemy-bigquery/noxfile.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,9 @@ def install_unittest_dependencies(session, *constraints):
273273
def unit(session, protobuf_implementation, install_extras=True):
274274
# Install all test dependencies, then install this package in-place.
275275

276-
if protobuf_implementation == "cpp" and session.python in (
277-
"3.11",
278-
"3.12",
279-
"3.13",
280-
"3.14",
281-
):
276+
# Install all test dependencies, then install this package in-place.
277+
py_version = tuple([int(v) for v in session.python.split(".")])
278+
if protobuf_implementation == "cpp" and py_version >= (3, 11):
282279
session.skip("cpp implementation is not supported in python 3.11+")
283280

284281
constraints_path = str(

0 commit comments

Comments
 (0)