Skip to content

Commit 5b19b8e

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

2 files changed

Lines changed: 4 additions & 30 deletions

File tree

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

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -568,25 +568,16 @@ replacements:
568568
@nox.session(python=ALL_PYTHON)
569569
@nox.parametrize(
570570
"protobuf_implementation",
571-
["python", "upb", "cpp"],
571+
["python", "upb"],
572572
)
573573
def unit(session, protobuf_implementation):
574574
# Install all test dependencies, then install this package in-place.
575-
py_version = tuple([int(v) for v in session.python.split(".")])
576-
if protobuf_implementation == "cpp" and py_version >= (3, 11):
577-
session.skip("cpp implementation is not supported in python 3.11+")
578575
579576
constraints_path = str(
580577
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
581578
)
582579
install_unittest_dependencies(session, "-c", constraints_path)
583580
584-
# TODO(https://github.com/googleapis/synthtool/issues/1976):
585-
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
586-
# The 'cpp' implementation requires Protobuf<4.
587-
if protobuf_implementation == "cpp":
588-
session.install("protobuf<4")
589-
590581
# Run py.test against the unit tests.
591582
session.run(
592583
"py.test",
@@ -818,15 +809,11 @@ replacements:
818809
@nox.session(python=DEFAULT_PYTHON_VERSION)
819810
@nox.parametrize(
820811
"protobuf_implementation",
821-
["python", "upb", "cpp"],
812+
["python", "upb"],
822813
)
823814
def prerelease_deps(session, protobuf_implementation):
824815
"""Run all tests with prerelease versions of dependencies installed."""
825816
826-
py_version = tuple([int(v) for v in session.python.split(".")])
827-
if protobuf_implementation == "cpp" and py_version >= (3, 11):
828-
session.skip("cpp implementation is not supported in python 3.11+")
829-
830817
# Install all dependencies
831818
session.install("-e", ".[all, tests, tracing]")
832819
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES

packages/google-cloud-bigtable/noxfile.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -216,25 +216,16 @@ def install_unittest_dependencies(session, *constraints):
216216
@nox.session(python=ALL_PYTHON)
217217
@nox.parametrize(
218218
"protobuf_implementation",
219-
["python", "upb", "cpp"],
219+
["python", "upb"],
220220
)
221221
def unit(session, protobuf_implementation):
222222
# Install all test dependencies, then install this package in-place.
223-
py_version = tuple([int(v) for v in session.python.split(".")])
224-
if protobuf_implementation == "cpp" and py_version >= (3, 11):
225-
session.skip("cpp implementation is not supported in python 3.11+")
226223

227224
constraints_path = str(
228225
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
229226
)
230227
install_unittest_dependencies(session, "-c", constraints_path)
231228

232-
# TODO(https://github.com/googleapis/synthtool/issues/1976):
233-
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
234-
# The 'cpp' implementation requires Protobuf<4.
235-
if protobuf_implementation == "cpp":
236-
session.install("protobuf<4")
237-
238229
# Run py.test against the unit tests.
239230
session.run(
240231
"py.test",
@@ -466,15 +457,11 @@ def docfx(session):
466457
@nox.session(python=DEFAULT_PYTHON_VERSION)
467458
@nox.parametrize(
468459
"protobuf_implementation",
469-
["python", "upb", "cpp"],
460+
["python", "upb"],
470461
)
471462
def prerelease_deps(session, protobuf_implementation):
472463
"""Run all tests with prerelease versions of dependencies installed."""
473464

474-
py_version = tuple([int(v) for v in session.python.split(".")])
475-
if protobuf_implementation == "cpp" and py_version >= (3, 11):
476-
session.skip("cpp implementation is not supported in python 3.11+")
477-
478465
# Install all dependencies
479466
session.install("-e", ".[all, tests, tracing]")
480467
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES

0 commit comments

Comments
 (0)