From dcecfc2e4cbe9ee216f7293380a8043aae5c5ab0 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 16 Jul 2026 17:21:29 +0000 Subject: [PATCH 1/3] tests: remove protobuf cpp from tests which is no longer used as of Protobuf 4.x --- .../spanner-integration.yaml | 43 +------------------ packages/google-cloud-spanner/noxfile.py | 43 +------------------ 2 files changed, 4 insertions(+), 82 deletions(-) diff --git a/.librarian/generator-input/client-post-processing/spanner-integration.yaml b/.librarian/generator-input/client-post-processing/spanner-integration.yaml index f4ae29dbf851..15f5d69b1366 100644 --- a/.librarian/generator-input/client-post-processing/spanner-integration.yaml +++ b/.librarian/generator-input/client-post-processing/spanner-integration.yaml @@ -649,6 +649,7 @@ replacements: "3.12", "3.13", "3.14", + "3.15", ] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", @@ -827,30 +828,16 @@ replacements: @nox.session(python=ALL_PYTHON) @nox.parametrize( "protobuf_implementation", - ["python", "upb", "cpp"], + ["python", "upb"], ) def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): - # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. - # The 'cpp' implementation requires Protobuf<4. - if protobuf_implementation == "cpp": - session.install("protobuf<4") - # Run py.test against the unit tests. args = [ "py.test", @@ -946,8 +933,6 @@ replacements: ("python", "POSTGRESQL"), ("upb", "GOOGLE_STANDARD_SQL"), ("upb", "POSTGRESQL"), - ("cpp", "GOOGLE_STANDARD_SQL"), - ("cpp", "POSTGRESQL"), ], ) def system(session, protobuf_implementation, database_dialect): @@ -975,14 +960,6 @@ replacements: "Only run system tests on real Spanner with one protobuf implementation to speed up the build" ) - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - # Install pyopenssl for mTLS testing. if os.environ.get("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true": session.install("pyopenssl") @@ -995,12 +972,6 @@ replacements: install_systemtest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): - # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. - # The 'cpp' implementation requires Protobuf<4. - if protobuf_implementation == "cpp": - session.install("protobuf<4") - # Run py.test against the system tests. if system_test_exists: args = [ @@ -1174,21 +1145,11 @@ replacements: ("python", "POSTGRESQL"), ("upb", "GOOGLE_STANDARD_SQL"), ("upb", "POSTGRESQL"), - ("cpp", "GOOGLE_STANDARD_SQL"), - ("cpp", "POSTGRESQL"), ], ) def prerelease_deps(session, protobuf_implementation, database_dialect): """Run all tests with prerelease versions of dependencies installed.""" - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - # Install all dependencies session.install("-e", ".[all, tests, tracing]") unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES diff --git a/packages/google-cloud-spanner/noxfile.py b/packages/google-cloud-spanner/noxfile.py index fa74716b8142..d0a3573f3505 100644 --- a/packages/google-cloud-spanner/noxfile.py +++ b/packages/google-cloud-spanner/noxfile.py @@ -36,6 +36,7 @@ "3.12", "3.13", "3.14", + "3.15", ] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", @@ -214,30 +215,16 @@ def install_unittest_dependencies(session, *constraints): @nox.session(python=ALL_PYTHON) @nox.parametrize( "protobuf_implementation", - ["python", "upb", "cpp"], + ["python", "upb"], ) def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): - # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. - # The 'cpp' implementation requires Protobuf<4. - if protobuf_implementation == "cpp": - session.install("protobuf<4") - # Run py.test against the unit tests. args = [ "py.test", @@ -333,8 +320,6 @@ def install_systemtest_dependencies(session, *constraints): ("python", "POSTGRESQL"), ("upb", "GOOGLE_STANDARD_SQL"), ("upb", "POSTGRESQL"), - ("cpp", "GOOGLE_STANDARD_SQL"), - ("cpp", "POSTGRESQL"), ], ) def system(session, protobuf_implementation, database_dialect): @@ -362,14 +347,6 @@ def system(session, protobuf_implementation, database_dialect): "Only run system tests on real Spanner with one protobuf implementation to speed up the build" ) - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - # Install pyopenssl for mTLS testing. if os.environ.get("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true": session.install("pyopenssl") @@ -382,12 +359,6 @@ def system(session, protobuf_implementation, database_dialect): install_systemtest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): - # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. - # The 'cpp' implementation requires Protobuf<4. - if protobuf_implementation == "cpp": - session.install("protobuf<4") - # Run py.test against the system tests. if system_test_exists: args = [ @@ -561,21 +532,11 @@ def docfx(session): ("python", "POSTGRESQL"), ("upb", "GOOGLE_STANDARD_SQL"), ("upb", "POSTGRESQL"), - ("cpp", "GOOGLE_STANDARD_SQL"), - ("cpp", "POSTGRESQL"), ], ) def prerelease_deps(session, protobuf_implementation, database_dialect): """Run all tests with prerelease versions of dependencies installed.""" - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - # Install all dependencies session.install("-e", ".[all, tests, tracing]") unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES From 5b19b8e2d97d1b357b55c377da75ca957f45492a Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 16 Jul 2026 17:23:43 +0000 Subject: [PATCH 2/3] tests: remove protobuf cpp from tests which is no longer used as of Protobuf 4.x --- .../bigtable-integration.yaml | 17 ++--------------- packages/google-cloud-bigtable/noxfile.py | 17 ++--------------- 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/.librarian/generator-input/client-post-processing/bigtable-integration.yaml b/.librarian/generator-input/client-post-processing/bigtable-integration.yaml index fb373802cddc..d81db4f46f18 100644 --- a/.librarian/generator-input/client-post-processing/bigtable-integration.yaml +++ b/.librarian/generator-input/client-post-processing/bigtable-integration.yaml @@ -568,25 +568,16 @@ replacements: @nox.session(python=ALL_PYTHON) @nox.parametrize( "protobuf_implementation", - ["python", "upb", "cpp"], + ["python", "upb"], ) def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - py_version = tuple([int(v) for v in session.python.split(".")]) - if protobuf_implementation == "cpp" and py_version >= (3, 11): - session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): - # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. - # The 'cpp' implementation requires Protobuf<4. - if protobuf_implementation == "cpp": - session.install("protobuf<4") - # Run py.test against the unit tests. session.run( "py.test", @@ -818,15 +809,11 @@ replacements: @nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", - ["python", "upb", "cpp"], + ["python", "upb"], ) def prerelease_deps(session, protobuf_implementation): """Run all tests with prerelease versions of dependencies installed.""" - py_version = tuple([int(v) for v in session.python.split(".")]) - if protobuf_implementation == "cpp" and py_version >= (3, 11): - session.skip("cpp implementation is not supported in python 3.11+") - # Install all dependencies session.install("-e", ".[all, tests, tracing]") unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES diff --git a/packages/google-cloud-bigtable/noxfile.py b/packages/google-cloud-bigtable/noxfile.py index e6ef8c1e9911..1f7571a7fbe7 100644 --- a/packages/google-cloud-bigtable/noxfile.py +++ b/packages/google-cloud-bigtable/noxfile.py @@ -216,25 +216,16 @@ def install_unittest_dependencies(session, *constraints): @nox.session(python=ALL_PYTHON) @nox.parametrize( "protobuf_implementation", - ["python", "upb", "cpp"], + ["python", "upb"], ) def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - py_version = tuple([int(v) for v in session.python.split(".")]) - if protobuf_implementation == "cpp" and py_version >= (3, 11): - session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): - # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. - # The 'cpp' implementation requires Protobuf<4. - if protobuf_implementation == "cpp": - session.install("protobuf<4") - # Run py.test against the unit tests. session.run( "py.test", @@ -466,15 +457,11 @@ def docfx(session): @nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", - ["python", "upb", "cpp"], + ["python", "upb"], ) def prerelease_deps(session, protobuf_implementation): """Run all tests with prerelease versions of dependencies installed.""" - py_version = tuple([int(v) for v in session.python.split(".")]) - if protobuf_implementation == "cpp" and py_version >= (3, 11): - session.skip("cpp implementation is not supported in python 3.11+") - # Install all dependencies session.install("-e", ".[all, tests, tracing]") unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES From 36c11a34f16f60b71227693f9de82c6b7290a726 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 16 Jul 2026 17:33:04 +0000 Subject: [PATCH 3/3] Add 3.15 to noxfile.py --- .../client-post-processing/bigtable-integration.yaml | 6 ++++++ packages/google-cloud-bigtable/noxfile.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.librarian/generator-input/client-post-processing/bigtable-integration.yaml b/.librarian/generator-input/client-post-processing/bigtable-integration.yaml index d81db4f46f18..2402a1c198fb 100644 --- a/.librarian/generator-input/client-post-processing/bigtable-integration.yaml +++ b/.librarian/generator-input/client-post-processing/bigtable-integration.yaml @@ -385,6 +385,7 @@ replacements: "3.12", "3.13", "3.14", + "3.15", ] UNIT_TEST_STANDARD_DEPENDENCIES = [ @@ -573,6 +574,11 @@ replacements: def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. + # TODO(https://github.com/googleapis/google-cloud-python/issues/17741): + # Remove once `google-crc32c` wheels are published for 3.15 + if session.python == "3.15": + session.skip("Skipping 3.15 until wheels are available for google-crc32c.") + constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) diff --git a/packages/google-cloud-bigtable/noxfile.py b/packages/google-cloud-bigtable/noxfile.py index 1f7571a7fbe7..c505e70e2472 100644 --- a/packages/google-cloud-bigtable/noxfile.py +++ b/packages/google-cloud-bigtable/noxfile.py @@ -33,6 +33,7 @@ "3.12", "3.13", "3.14", + "3.15", ] UNIT_TEST_STANDARD_DEPENDENCIES = [ @@ -221,6 +222,11 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. + # TODO(https://github.com/googleapis/google-cloud-python/issues/17741): + # Remove once `google-crc32c` wheels are published for 3.15 + if session.python == "3.15": + session.skip("Skipping 3.15 until wheels are available for google-crc32c.") + constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" )