Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 12879ca

Browse files
authored
tests: remove tests for protobuf cpp backend (#2585)
1 parent 30ab1e5 commit 12879ca

File tree

8 files changed

+16
-144
lines changed

8 files changed

+16
-144
lines changed

gapic/templates/noxfile.py.j2

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -248,27 +248,16 @@ def install_unittest_dependencies(session, *constraints):
248248
@nox.session(python=ALL_PYTHON)
249249
@nox.parametrize(
250250
"protobuf_implementation",
251-
["python", "upb", "cpp"],
251+
["python", "upb"],
252252
)
253253
def unit(session, protobuf_implementation):
254254
# Install all test dependencies, then install this package in-place.
255255

256-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
257-
# Remove this check once support for Protobuf 3.x is dropped.
258-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
259-
session.skip("cpp implementation is not supported in python 3.11+")
260-
261256
constraints_path = str(
262257
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
263258
)
264259
install_unittest_dependencies(session, "-c", constraints_path)
265260

266-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
267-
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
268-
# The 'cpp' implementation requires Protobuf<4.
269-
if protobuf_implementation == "cpp":
270-
session.install("protobuf<4")
271-
272261
# Run py.test against the unit tests.
273262
session.run(
274263
"py.test",
@@ -463,7 +452,7 @@ def docfx(session):
463452
@nox.session(python=PREVIEW_PYTHON_VERSION)
464453
@nox.parametrize(
465454
"protobuf_implementation",
466-
["python", "upb", "cpp"],
455+
["python", "upb"],
467456
)
468457
def prerelease_deps(session, protobuf_implementation):
469458
"""
@@ -473,11 +462,6 @@ def prerelease_deps(session, protobuf_implementation):
473462
`pip install --pre <package>`.
474463
"""
475464

476-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
477-
# Remove this check once support for Protobuf 3.x is dropped.
478-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
479-
session.skip("cpp implementation is not supported in python 3.11+")
480-
481465
# Install all dependencies
482466
session.install("-e", ".")
483467

tests/integration/goldens/asset/noxfile.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -246,27 +246,16 @@ def install_unittest_dependencies(session, *constraints):
246246
@nox.session(python=ALL_PYTHON)
247247
@nox.parametrize(
248248
"protobuf_implementation",
249-
["python", "upb", "cpp"],
249+
["python", "upb"],
250250
)
251251
def unit(session, protobuf_implementation):
252252
# Install all test dependencies, then install this package in-place.
253253

254-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
255-
# Remove this check once support for Protobuf 3.x is dropped.
256-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
257-
session.skip("cpp implementation is not supported in python 3.11+")
258-
259254
constraints_path = str(
260255
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
261256
)
262257
install_unittest_dependencies(session, "-c", constraints_path)
263258

264-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
265-
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
266-
# The 'cpp' implementation requires Protobuf<4.
267-
if protobuf_implementation == "cpp":
268-
session.install("protobuf<4")
269-
270259
# Run py.test against the unit tests.
271260
session.run(
272261
"py.test",
@@ -455,7 +444,7 @@ def docfx(session):
455444
@nox.session(python=PREVIEW_PYTHON_VERSION)
456445
@nox.parametrize(
457446
"protobuf_implementation",
458-
["python", "upb", "cpp"],
447+
["python", "upb"],
459448
)
460449
def prerelease_deps(session, protobuf_implementation):
461450
"""
@@ -465,11 +454,6 @@ def prerelease_deps(session, protobuf_implementation):
465454
`pip install --pre <package>`.
466455
"""
467456

468-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
469-
# Remove this check once support for Protobuf 3.x is dropped.
470-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
471-
session.skip("cpp implementation is not supported in python 3.11+")
472-
473457
# Install all dependencies
474458
session.install("-e", ".")
475459

tests/integration/goldens/credentials/noxfile.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -246,27 +246,16 @@ def install_unittest_dependencies(session, *constraints):
246246
@nox.session(python=ALL_PYTHON)
247247
@nox.parametrize(
248248
"protobuf_implementation",
249-
["python", "upb", "cpp"],
249+
["python", "upb"],
250250
)
251251
def unit(session, protobuf_implementation):
252252
# Install all test dependencies, then install this package in-place.
253253

254-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
255-
# Remove this check once support for Protobuf 3.x is dropped.
256-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
257-
session.skip("cpp implementation is not supported in python 3.11+")
258-
259254
constraints_path = str(
260255
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
261256
)
262257
install_unittest_dependencies(session, "-c", constraints_path)
263258

264-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
265-
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
266-
# The 'cpp' implementation requires Protobuf<4.
267-
if protobuf_implementation == "cpp":
268-
session.install("protobuf<4")
269-
270259
# Run py.test against the unit tests.
271260
session.run(
272261
"py.test",
@@ -455,7 +444,7 @@ def docfx(session):
455444
@nox.session(python=PREVIEW_PYTHON_VERSION)
456445
@nox.parametrize(
457446
"protobuf_implementation",
458-
["python", "upb", "cpp"],
447+
["python", "upb"],
459448
)
460449
def prerelease_deps(session, protobuf_implementation):
461450
"""
@@ -465,11 +454,6 @@ def prerelease_deps(session, protobuf_implementation):
465454
`pip install --pre <package>`.
466455
"""
467456

468-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
469-
# Remove this check once support for Protobuf 3.x is dropped.
470-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
471-
session.skip("cpp implementation is not supported in python 3.11+")
472-
473457
# Install all dependencies
474458
session.install("-e", ".")
475459

tests/integration/goldens/eventarc/noxfile.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -246,27 +246,16 @@ def install_unittest_dependencies(session, *constraints):
246246
@nox.session(python=ALL_PYTHON)
247247
@nox.parametrize(
248248
"protobuf_implementation",
249-
["python", "upb", "cpp"],
249+
["python", "upb"],
250250
)
251251
def unit(session, protobuf_implementation):
252252
# Install all test dependencies, then install this package in-place.
253253

254-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
255-
# Remove this check once support for Protobuf 3.x is dropped.
256-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
257-
session.skip("cpp implementation is not supported in python 3.11+")
258-
259254
constraints_path = str(
260255
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
261256
)
262257
install_unittest_dependencies(session, "-c", constraints_path)
263258

264-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
265-
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
266-
# The 'cpp' implementation requires Protobuf<4.
267-
if protobuf_implementation == "cpp":
268-
session.install("protobuf<4")
269-
270259
# Run py.test against the unit tests.
271260
session.run(
272261
"py.test",
@@ -455,7 +444,7 @@ def docfx(session):
455444
@nox.session(python=PREVIEW_PYTHON_VERSION)
456445
@nox.parametrize(
457446
"protobuf_implementation",
458-
["python", "upb", "cpp"],
447+
["python", "upb"],
459448
)
460449
def prerelease_deps(session, protobuf_implementation):
461450
"""
@@ -465,11 +454,6 @@ def prerelease_deps(session, protobuf_implementation):
465454
`pip install --pre <package>`.
466455
"""
467456

468-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
469-
# Remove this check once support for Protobuf 3.x is dropped.
470-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
471-
session.skip("cpp implementation is not supported in python 3.11+")
472-
473457
# Install all dependencies
474458
session.install("-e", ".")
475459

tests/integration/goldens/logging/noxfile.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -246,27 +246,16 @@ def install_unittest_dependencies(session, *constraints):
246246
@nox.session(python=ALL_PYTHON)
247247
@nox.parametrize(
248248
"protobuf_implementation",
249-
["python", "upb", "cpp"],
249+
["python", "upb"],
250250
)
251251
def unit(session, protobuf_implementation):
252252
# Install all test dependencies, then install this package in-place.
253253

254-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
255-
# Remove this check once support for Protobuf 3.x is dropped.
256-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
257-
session.skip("cpp implementation is not supported in python 3.11+")
258-
259254
constraints_path = str(
260255
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
261256
)
262257
install_unittest_dependencies(session, "-c", constraints_path)
263258

264-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
265-
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
266-
# The 'cpp' implementation requires Protobuf<4.
267-
if protobuf_implementation == "cpp":
268-
session.install("protobuf<4")
269-
270259
# Run py.test against the unit tests.
271260
session.run(
272261
"py.test",
@@ -455,7 +444,7 @@ def docfx(session):
455444
@nox.session(python=PREVIEW_PYTHON_VERSION)
456445
@nox.parametrize(
457446
"protobuf_implementation",
458-
["python", "upb", "cpp"],
447+
["python", "upb"],
459448
)
460449
def prerelease_deps(session, protobuf_implementation):
461450
"""
@@ -465,11 +454,6 @@ def prerelease_deps(session, protobuf_implementation):
465454
`pip install --pre <package>`.
466455
"""
467456

468-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
469-
# Remove this check once support for Protobuf 3.x is dropped.
470-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
471-
session.skip("cpp implementation is not supported in python 3.11+")
472-
473457
# Install all dependencies
474458
session.install("-e", ".")
475459

tests/integration/goldens/logging_internal/noxfile.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -246,27 +246,16 @@ def install_unittest_dependencies(session, *constraints):
246246
@nox.session(python=ALL_PYTHON)
247247
@nox.parametrize(
248248
"protobuf_implementation",
249-
["python", "upb", "cpp"],
249+
["python", "upb"],
250250
)
251251
def unit(session, protobuf_implementation):
252252
# Install all test dependencies, then install this package in-place.
253253

254-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
255-
# Remove this check once support for Protobuf 3.x is dropped.
256-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
257-
session.skip("cpp implementation is not supported in python 3.11+")
258-
259254
constraints_path = str(
260255
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
261256
)
262257
install_unittest_dependencies(session, "-c", constraints_path)
263258

264-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
265-
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
266-
# The 'cpp' implementation requires Protobuf<4.
267-
if protobuf_implementation == "cpp":
268-
session.install("protobuf<4")
269-
270259
# Run py.test against the unit tests.
271260
session.run(
272261
"py.test",
@@ -455,7 +444,7 @@ def docfx(session):
455444
@nox.session(python=PREVIEW_PYTHON_VERSION)
456445
@nox.parametrize(
457446
"protobuf_implementation",
458-
["python", "upb", "cpp"],
447+
["python", "upb"],
459448
)
460449
def prerelease_deps(session, protobuf_implementation):
461450
"""
@@ -465,11 +454,6 @@ def prerelease_deps(session, protobuf_implementation):
465454
`pip install --pre <package>`.
466455
"""
467456

468-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
469-
# Remove this check once support for Protobuf 3.x is dropped.
470-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
471-
session.skip("cpp implementation is not supported in python 3.11+")
472-
473457
# Install all dependencies
474458
session.install("-e", ".")
475459

tests/integration/goldens/redis/noxfile.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -246,27 +246,16 @@ def install_unittest_dependencies(session, *constraints):
246246
@nox.session(python=ALL_PYTHON)
247247
@nox.parametrize(
248248
"protobuf_implementation",
249-
["python", "upb", "cpp"],
249+
["python", "upb"],
250250
)
251251
def unit(session, protobuf_implementation):
252252
# Install all test dependencies, then install this package in-place.
253253

254-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
255-
# Remove this check once support for Protobuf 3.x is dropped.
256-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
257-
session.skip("cpp implementation is not supported in python 3.11+")
258-
259254
constraints_path = str(
260255
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
261256
)
262257
install_unittest_dependencies(session, "-c", constraints_path)
263258

264-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
265-
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
266-
# The 'cpp' implementation requires Protobuf<4.
267-
if protobuf_implementation == "cpp":
268-
session.install("protobuf<4")
269-
270259
# Run py.test against the unit tests.
271260
session.run(
272261
"py.test",
@@ -455,7 +444,7 @@ def docfx(session):
455444
@nox.session(python=PREVIEW_PYTHON_VERSION)
456445
@nox.parametrize(
457446
"protobuf_implementation",
458-
["python", "upb", "cpp"],
447+
["python", "upb"],
459448
)
460449
def prerelease_deps(session, protobuf_implementation):
461450
"""
@@ -465,11 +454,6 @@ def prerelease_deps(session, protobuf_implementation):
465454
`pip install --pre <package>`.
466455
"""
467456

468-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
469-
# Remove this check once support for Protobuf 3.x is dropped.
470-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
471-
session.skip("cpp implementation is not supported in python 3.11+")
472-
473457
# Install all dependencies
474458
session.install("-e", ".")
475459

tests/integration/goldens/redis_selective/noxfile.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -246,27 +246,16 @@ def install_unittest_dependencies(session, *constraints):
246246
@nox.session(python=ALL_PYTHON)
247247
@nox.parametrize(
248248
"protobuf_implementation",
249-
["python", "upb", "cpp"],
249+
["python", "upb"],
250250
)
251251
def unit(session, protobuf_implementation):
252252
# Install all test dependencies, then install this package in-place.
253253

254-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
255-
# Remove this check once support for Protobuf 3.x is dropped.
256-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
257-
session.skip("cpp implementation is not supported in python 3.11+")
258-
259254
constraints_path = str(
260255
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
261256
)
262257
install_unittest_dependencies(session, "-c", constraints_path)
263258

264-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
265-
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
266-
# The 'cpp' implementation requires Protobuf<4.
267-
if protobuf_implementation == "cpp":
268-
session.install("protobuf<4")
269-
270259
# Run py.test against the unit tests.
271260
session.run(
272261
"py.test",
@@ -455,7 +444,7 @@ def docfx(session):
455444
@nox.session(python=PREVIEW_PYTHON_VERSION)
456445
@nox.parametrize(
457446
"protobuf_implementation",
458-
["python", "upb", "cpp"],
447+
["python", "upb"],
459448
)
460449
def prerelease_deps(session, protobuf_implementation):
461450
"""
@@ -465,11 +454,6 @@ def prerelease_deps(session, protobuf_implementation):
465454
`pip install --pre <package>`.
466455
"""
467456

468-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2388):
469-
# Remove this check once support for Protobuf 3.x is dropped.
470-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
471-
session.skip("cpp implementation is not supported in python 3.11+")
472-
473457
# Install all dependencies
474458
session.install("-e", ".")
475459

0 commit comments

Comments
 (0)