Skip to content

Commit dcecfc2

Browse files
committed
tests: remove protobuf cpp from tests which is no longer used as of Protobuf 4.x
1 parent 2c3c213 commit dcecfc2

2 files changed

Lines changed: 4 additions & 82 deletions

File tree

.librarian/generator-input/client-post-processing/spanner-integration.yaml

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ replacements:
649649
"3.12",
650650
"3.13",
651651
"3.14",
652+
"3.15",
652653
]
653654
UNIT_TEST_STANDARD_DEPENDENCIES = [
654655
"mock",
@@ -827,30 +828,16 @@ replacements:
827828
@nox.session(python=ALL_PYTHON)
828829
@nox.parametrize(
829830
"protobuf_implementation",
830-
["python", "upb", "cpp"],
831+
["python", "upb"],
831832
)
832833
def unit(session, protobuf_implementation):
833834
# Install all test dependencies, then install this package in-place.
834835
835-
if protobuf_implementation == "cpp" and session.python in (
836-
"3.11",
837-
"3.12",
838-
"3.13",
839-
"3.14",
840-
):
841-
session.skip("cpp implementation is not supported in python 3.11+")
842-
843836
constraints_path = str(
844837
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
845838
)
846839
install_unittest_dependencies(session, "-c", constraints_path)
847840
848-
# TODO(https://github.com/googleapis/synthtool/issues/1976):
849-
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
850-
# The 'cpp' implementation requires Protobuf<4.
851-
if protobuf_implementation == "cpp":
852-
session.install("protobuf<4")
853-
854841
# Run py.test against the unit tests.
855842
args = [
856843
"py.test",
@@ -946,8 +933,6 @@ replacements:
946933
("python", "POSTGRESQL"),
947934
("upb", "GOOGLE_STANDARD_SQL"),
948935
("upb", "POSTGRESQL"),
949-
("cpp", "GOOGLE_STANDARD_SQL"),
950-
("cpp", "POSTGRESQL"),
951936
],
952937
)
953938
def system(session, protobuf_implementation, database_dialect):
@@ -975,14 +960,6 @@ replacements:
975960
"Only run system tests on real Spanner with one protobuf implementation to speed up the build"
976961
)
977962
978-
if protobuf_implementation == "cpp" and session.python in (
979-
"3.11",
980-
"3.12",
981-
"3.13",
982-
"3.14",
983-
):
984-
session.skip("cpp implementation is not supported in python 3.11+")
985-
986963
# Install pyopenssl for mTLS testing.
987964
if os.environ.get("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true":
988965
session.install("pyopenssl")
@@ -995,12 +972,6 @@ replacements:
995972
996973
install_systemtest_dependencies(session, "-c", constraints_path)
997974
998-
# TODO(https://github.com/googleapis/synthtool/issues/1976):
999-
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
1000-
# The 'cpp' implementation requires Protobuf<4.
1001-
if protobuf_implementation == "cpp":
1002-
session.install("protobuf<4")
1003-
1004975
# Run py.test against the system tests.
1005976
if system_test_exists:
1006977
args = [
@@ -1174,21 +1145,11 @@ replacements:
11741145
("python", "POSTGRESQL"),
11751146
("upb", "GOOGLE_STANDARD_SQL"),
11761147
("upb", "POSTGRESQL"),
1177-
("cpp", "GOOGLE_STANDARD_SQL"),
1178-
("cpp", "POSTGRESQL"),
11791148
],
11801149
)
11811150
def prerelease_deps(session, protobuf_implementation, database_dialect):
11821151
"""Run all tests with prerelease versions of dependencies installed."""
11831152
1184-
if protobuf_implementation == "cpp" and session.python in (
1185-
"3.11",
1186-
"3.12",
1187-
"3.13",
1188-
"3.14",
1189-
):
1190-
session.skip("cpp implementation is not supported in python 3.11+")
1191-
11921153
# Install all dependencies
11931154
session.install("-e", ".[all, tests, tracing]")
11941155
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES

packages/google-cloud-spanner/noxfile.py

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"3.12",
3737
"3.13",
3838
"3.14",
39+
"3.15",
3940
]
4041
UNIT_TEST_STANDARD_DEPENDENCIES = [
4142
"mock",
@@ -214,30 +215,16 @@ def install_unittest_dependencies(session, *constraints):
214215
@nox.session(python=ALL_PYTHON)
215216
@nox.parametrize(
216217
"protobuf_implementation",
217-
["python", "upb", "cpp"],
218+
["python", "upb"],
218219
)
219220
def unit(session, protobuf_implementation):
220221
# Install all test dependencies, then install this package in-place.
221222

222-
if protobuf_implementation == "cpp" and session.python in (
223-
"3.11",
224-
"3.12",
225-
"3.13",
226-
"3.14",
227-
):
228-
session.skip("cpp implementation is not supported in python 3.11+")
229-
230223
constraints_path = str(
231224
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
232225
)
233226
install_unittest_dependencies(session, "-c", constraints_path)
234227

235-
# TODO(https://github.com/googleapis/synthtool/issues/1976):
236-
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
237-
# The 'cpp' implementation requires Protobuf<4.
238-
if protobuf_implementation == "cpp":
239-
session.install("protobuf<4")
240-
241228
# Run py.test against the unit tests.
242229
args = [
243230
"py.test",
@@ -333,8 +320,6 @@ def install_systemtest_dependencies(session, *constraints):
333320
("python", "POSTGRESQL"),
334321
("upb", "GOOGLE_STANDARD_SQL"),
335322
("upb", "POSTGRESQL"),
336-
("cpp", "GOOGLE_STANDARD_SQL"),
337-
("cpp", "POSTGRESQL"),
338323
],
339324
)
340325
def system(session, protobuf_implementation, database_dialect):
@@ -362,14 +347,6 @@ def system(session, protobuf_implementation, database_dialect):
362347
"Only run system tests on real Spanner with one protobuf implementation to speed up the build"
363348
)
364349

365-
if protobuf_implementation == "cpp" and session.python in (
366-
"3.11",
367-
"3.12",
368-
"3.13",
369-
"3.14",
370-
):
371-
session.skip("cpp implementation is not supported in python 3.11+")
372-
373350
# Install pyopenssl for mTLS testing.
374351
if os.environ.get("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true":
375352
session.install("pyopenssl")
@@ -382,12 +359,6 @@ def system(session, protobuf_implementation, database_dialect):
382359

383360
install_systemtest_dependencies(session, "-c", constraints_path)
384361

385-
# TODO(https://github.com/googleapis/synthtool/issues/1976):
386-
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
387-
# The 'cpp' implementation requires Protobuf<4.
388-
if protobuf_implementation == "cpp":
389-
session.install("protobuf<4")
390-
391362
# Run py.test against the system tests.
392363
if system_test_exists:
393364
args = [
@@ -561,21 +532,11 @@ def docfx(session):
561532
("python", "POSTGRESQL"),
562533
("upb", "GOOGLE_STANDARD_SQL"),
563534
("upb", "POSTGRESQL"),
564-
("cpp", "GOOGLE_STANDARD_SQL"),
565-
("cpp", "POSTGRESQL"),
566535
],
567536
)
568537
def prerelease_deps(session, protobuf_implementation, database_dialect):
569538
"""Run all tests with prerelease versions of dependencies installed."""
570539

571-
if protobuf_implementation == "cpp" and session.python in (
572-
"3.11",
573-
"3.12",
574-
"3.13",
575-
"3.14",
576-
):
577-
session.skip("cpp implementation is not supported in python 3.11+")
578-
579540
# Install all dependencies
580541
session.install("-e", ".[all, tests, tracing]")
581542
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES

0 commit comments

Comments
 (0)