diff --git a/.librarian/generator-input/client-post-processing/storage-integration.yaml b/.librarian/generator-input/client-post-processing/storage-integration.yaml index eb1fc8547227..4c77dbfd2807 100644 --- a/.librarian/generator-input/client-post-processing/storage-integration.yaml +++ b/.librarian/generator-input/client-post-processing/storage-integration.yaml @@ -603,7 +603,7 @@ replacements: "grpcio-status >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0; python_version < '3.13'", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", - "protobuf >= 4.25.8, < 8.0.0", + "protobuf >= 6.33.5, < 8.0.0", "grpc-google-iam-v1 >= 0.14.0, <1.0.0", ], "protobuf": ["protobuf >= 3.20.2, < 7.0.0"], @@ -656,7 +656,7 @@ replacements: grpcio==1.59.0 grpcio-status==1.59.0 proto-plus==1.22.3 - protobuf==4.25.8 + protobuf==6.33.5 grpc-google-iam-v1==0.14.0 opentelemetry-api==1.1.0 requests==2.22.0 diff --git a/packages/bigframes/testing/constraints-3.10.txt b/packages/bigframes/testing/constraints-3.10.txt index 0c76f1dda750..0e8e70b13d31 100644 --- a/packages/bigframes/testing/constraints-3.10.txt +++ b/packages/bigframes/testing/constraints-3.10.txt @@ -95,7 +95,7 @@ pluggy==1.6.0 prompt_toolkit==3.0.52 propcache==0.4.1 proto-plus==1.27.1 -protobuf==4.25.8 +protobuf==6.33.5 psygnal==0.15.1 ptyprocess==0.7.0 pure_eval==0.2.3 diff --git a/packages/bigframes/testing/constraints-3.11.txt b/packages/bigframes/testing/constraints-3.11.txt index 77645780b7b0..a992843a315d 100644 --- a/packages/bigframes/testing/constraints-3.11.txt +++ b/packages/bigframes/testing/constraints-3.11.txt @@ -401,7 +401,7 @@ prompt_toolkit==3.0.51 propcache==0.3.2 prophet==1.1.7 proto-plus==1.26.1 -protobuf==5.29.5 +protobuf==6.33.5 psutil==5.9.5 psycopg2==2.9.10 psygnal==0.14.0 diff --git a/packages/google-api-core/google/api_core/_python_package_support.py b/packages/google-api-core/google/api_core/_python_package_support.py index b8732b6a2f3d..52b8e56eec5b 100644 --- a/packages/google-api-core/google/api_core/_python_package_support.py +++ b/packages/google-api-core/google/api_core/_python_package_support.py @@ -37,7 +37,7 @@ _PACKAGE_DEPENDENCY_WARNINGS = [ DependencyConstraint( "google.protobuf", - minimum_fully_supported_version="4.25.8", + minimum_fully_supported_version="6.33.5", recommended_version="6.x", ) ] @@ -52,7 +52,7 @@ def parse_version_to_tuple(version_string: str) -> ParsedVersion: """Safely converts a semantic version string to a comparable tuple of integers. - Example: "4.25.8" -> (4, 25, 8) + Example: "6.33.5" -> (6, 33, 5) Ignores non-numeric parts and handles common version formats. Args: diff --git a/packages/google-api-core/noxfile.py b/packages/google-api-core/noxfile.py index 0bad668a80dd..6a5e50cc3624 100644 --- a/packages/google-api-core/noxfile.py +++ b/packages/google-api-core/noxfile.py @@ -289,51 +289,36 @@ def default( @nox.session(python=ALL_PYTHON) @nox.parametrize( - ["install_grpc", "install_async_rest", "python_versions", "legacy_proto"], + ["install_grpc", "install_async_rest", "python_versions"], [ - (True, False, None, None), # Run unit tests with grpcio installed - (False, False, None, None), # Run unit tests without grpcio installed + (True, False, None), # Run unit tests with grpcio installed + (False, False, None), # Run unit tests without grpcio installed ( True, True, None, - None, ), # Run unit tests with grpcio and async rest installed # TODO: Remove once we stop support for protobuf 4.x. ( True, False, ["3.10", "3.11"], - 4, ), # Run proto4 tests with grpcio/grpcio-gcp installed ], ) def unit( - session, install_grpc, install_async_rest, python_versions=None, legacy_proto=None + session, install_grpc, install_async_rest, python_versions=None ): """Run the unit test suite with the given configuration parameters. If `python_versions` is provided, the test suite only runs when the Python version (xx.yy) is one of the values in `python_versions`. - - If `legacy_proto` is provided, this test suite will explicitly install the proto library at - that major version. Only a few values are supported at any one time; the intent is to test - deprecated but noyet abandoned versions. """ if python_versions and session.python not in python_versions: session.log(f"Skipping session for Python {session.python}") session.skip() - match legacy_proto: - case 4: - # Pin protobuf to a 4.x version to ensure coverage for the legacy code path. - session.install("protobuf>=4.25.8,<5.0.0") - case None | False: - pass - case _: - assert False, f"Unknown legacy_proto: {legacy_proto}" - default( session=session, install_grpc=install_grpc, diff --git a/packages/google-api-core/testing/constraints-3.10.txt b/packages/google-api-core/testing/constraints-3.10.txt index 4b3f2d263eef..ab0be9fecc03 100644 --- a/packages/google-api-core/testing/constraints-3.10.txt +++ b/packages/google-api-core/testing/constraints-3.10.txt @@ -6,7 +6,7 @@ # e.g., if pyproject.toml has "foo >= 1.14.0, < 2.0.0dev", # Then this file should have foo==1.14.0 googleapis-common-protos==1.63.2 -protobuf==5.29.6 +protobuf==6.33.5 google-auth==2.14.1 requests==2.33.0 grpcio==1.41.0 diff --git a/packages/google-api-core/testing/constraints-async-rest-3.10.txt b/packages/google-api-core/testing/constraints-async-rest-3.10.txt index f1b6af2fcd94..322fd7ef19bc 100644 --- a/packages/google-api-core/testing/constraints-async-rest-3.10.txt +++ b/packages/google-api-core/testing/constraints-async-rest-3.10.txt @@ -6,7 +6,7 @@ # e.g., if pyproject.toml has "foo >= 1.14.0, < 2.0.0dev", # Then this file should have foo==1.14.0 googleapis-common-protos==1.63.2 -protobuf==5.29.6 +protobuf==6.33.5 google-auth==2.14.1 requests==2.33.0 grpcio==1.41.0 diff --git a/packages/google-cloud-access-context-manager/setup.py b/packages/google-cloud-access-context-manager/setup.py index 94c032210fb2..1bf4b01b023c 100644 --- a/packages/google-cloud-access-context-manager/setup.py +++ b/packages/google-cloud-access-context-manager/setup.py @@ -30,7 +30,7 @@ release_status = "Development Status :: 4 - Beta" dependencies = [ "google-api-core[grpc] >= 2.11.0, <3.0.0", - "protobuf >= 4.25.8, < 8.0.0", + "protobuf >= 6.33.5, < 8.0.0", ] # Setup boilerplate below this line. diff --git a/packages/google-cloud-access-context-manager/testing/constraints-3.9.txt b/packages/google-cloud-access-context-manager/testing/constraints-3.9.txt index 2b0e26586a65..58e7ed875ec4 100644 --- a/packages/google-cloud-access-context-manager/testing/constraints-3.9.txt +++ b/packages/google-cloud-access-context-manager/testing/constraints-3.9.txt @@ -5,5 +5,5 @@ # # e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", # Then this file should have foo==1.14.0 -protobuf==4.25.8 +protobuf==6.33.5 google-api-core==2.11.0 diff --git a/packages/google-cloud-audit-log/setup.py b/packages/google-cloud-audit-log/setup.py index cc263435b60b..28e6c4524484 100644 --- a/packages/google-cloud-audit-log/setup.py +++ b/packages/google-cloud-audit-log/setup.py @@ -23,7 +23,7 @@ version = "0.6.0" release_status = "Development Status :: 4 - Beta" dependencies = [ - "protobuf >= 4.25.8, < 8.0.0", + "protobuf >= 6.33.5, < 8.0.0", "googleapis-common-protos >= 1.56.2, < 2.0.0", ] diff --git a/packages/google-cloud-audit-log/testing/constraints-3.9.txt b/packages/google-cloud-audit-log/testing/constraints-3.9.txt index 35307162417e..d11189ef6af6 100644 --- a/packages/google-cloud-audit-log/testing/constraints-3.9.txt +++ b/packages/google-cloud-audit-log/testing/constraints-3.9.txt @@ -31,5 +31,5 @@ # Pin the version to the lower bound. # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 -protobuf==4.25.8 +protobuf==6.33.5 googleapis-common-protos==1.63.2 diff --git a/packages/google-cloud-bigquery/testing/constraints-3.10.txt b/packages/google-cloud-bigquery/testing/constraints-3.10.txt index 8e63363f1096..64b7d67cdc3d 100644 --- a/packages/google-cloud-bigquery/testing/constraints-3.10.txt +++ b/packages/google-cloud-bigquery/testing/constraints-3.10.txt @@ -24,4 +24,4 @@ opentelemetry-api==1.16.0 opentelemetry-sdk==1.16.0 opentelemetry-instrumentation==0.41b0 proto-plus==1.22.3 -protobuf==4.25.8 +protobuf==6.33.5 \ No newline at end of file diff --git a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/rbacrolebindingactuation_v1/__init__.py b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/rbacrolebindingactuation_v1/__init__.py index a32bd1358a3a..b29b84210f7f 100644 --- a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/rbacrolebindingactuation_v1/__init__.py +++ b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/rbacrolebindingactuation_v1/__init__.py @@ -69,7 +69,7 @@ def parse_version_to_tuple(version_string: str): """Safely converts a semantic version string to a comparable tuple of integers. - Example: "4.25.8" -> (4, 25, 8) + Example: "6.33.5" -> (6, 33, 5) Ignores non-numeric parts and handles common version formats. Args: version_string: Version string in the format "x.y.z" or "x.y.z" @@ -98,8 +98,8 @@ def _get_version(dependency_name): return (None, "--") _dependency_package = "google.protobuf" - _next_supported_version = "4.25.8" - _next_supported_version_tuple = (4, 25, 8) + _next_supported_version = "6.33.5" + _next_supported_version_tuple = (6, 33, 5) _recommendation = " (we recommend 6.x)" (_version_used, _version_used_string) = _get_version(_dependency_package) if _version_used and _version_used < _next_supported_version_tuple: diff --git a/packages/google-cloud-logging/constraints.txt b/packages/google-cloud-logging/constraints.txt index ea6d85e3e029..c37720ecae11 100644 --- a/packages/google-cloud-logging/constraints.txt +++ b/packages/google-cloud-logging/constraints.txt @@ -9,4 +9,4 @@ grpcio==1.75.1 opentelemetry-api==1.16.0 proto-plus==1.22.3 proto-plus==1.25.0 -protobuf==4.25.8 \ No newline at end of file +protobuf==6.33.5 \ No newline at end of file diff --git a/packages/google-cloud-ndb/setup.py b/packages/google-cloud-ndb/setup.py index 8c22f5349b16..258551bf2d11 100644 --- a/packages/google-cloud-ndb/setup.py +++ b/packages/google-cloud-ndb/setup.py @@ -42,7 +42,7 @@ def main(): dependencies = [ "google-api-core[grpc] >= 2.11.0, <3.0.0", "google-cloud-datastore >= 2.16.0, != 2.20.2, < 3.0.0", - "protobuf >= 4.25.8, < 8.0.0", + "protobuf >= 6.33.5, < 8.0.0", "pymemcache >= 2.1.0, < 5.0.0", "pytz >= 2022.1", "redis >= 3.0.0, < 8.0.0", diff --git a/packages/google-cloud-ndb/testing/constraints-3.10.txt b/packages/google-cloud-ndb/testing/constraints-3.10.txt index c4835683ad0a..1c249e72604a 100644 --- a/packages/google-cloud-ndb/testing/constraints-3.10.txt +++ b/packages/google-cloud-ndb/testing/constraints-3.10.txt @@ -7,7 +7,7 @@ # Then this file should have foo==1.14.0 google-cloud-datastore==2.16.0 google-api-core==2.11.0 -protobuf==4.25.8 +protobuf==6.33.5 pymemcache==2.1.0 redis==3.0.0 pytz==2022.1 diff --git a/packages/google-cloud-storage/setup.py b/packages/google-cloud-storage/setup.py index b872eff7dbd8..7f9e00278aed 100644 --- a/packages/google-cloud-storage/setup.py +++ b/packages/google-cloud-storage/setup.py @@ -67,10 +67,10 @@ "grpcio-status >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0; python_version < '3.13'", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", - "protobuf >= 4.25.8, < 8.0.0", + "protobuf >= 6.33.5, < 8.0.0", "grpc-google-iam-v1 >= 0.14.0, <1.0.0", ], - "protobuf": ["protobuf >= 3.20.2, < 7.0.0"], + "protobuf": ["protobuf >= 6.33.5, < 8.0.0"], "tracing": [ "opentelemetry-api >= 1.1.0, < 2.0.0", ], diff --git a/packages/google-cloud-storage/testing/constraints-3.10.txt b/packages/google-cloud-storage/testing/constraints-3.10.txt index e4294e2f1397..706d60854772 100644 --- a/packages/google-cloud-storage/testing/constraints-3.10.txt +++ b/packages/google-cloud-storage/testing/constraints-3.10.txt @@ -13,7 +13,7 @@ google-resumable-media==2.7.2 grpcio==1.59.0 grpcio-status==1.59.0 proto-plus==1.22.3 -protobuf==4.25.8 +protobuf==6.33.5 grpc-google-iam-v1==0.14.0 opentelemetry-api==1.1.0 requests==2.22.0 diff --git a/packages/googleapis-common-protos/noxfile.py b/packages/googleapis-common-protos/noxfile.py index ce20cdcfcad8..d1b76b51e11b 100644 --- a/packages/googleapis-common-protos/noxfile.py +++ b/packages/googleapis-common-protos/noxfile.py @@ -210,30 +210,16 @@ def install_unittest_dependencies(session, *constraints): @nox.session(python=UNIT_TEST_PYTHON_VERSIONS) @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. session.run( "py.test", @@ -423,7 +409,7 @@ def docfx(session): @nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", - ["python", "upb", "cpp"], + ["python", "upb"], ) def prerelease_deps(session, protobuf_implementation): """ @@ -433,14 +419,6 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - 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", ".") diff --git a/packages/googleapis-common-protos/pyproject.toml b/packages/googleapis-common-protos/pyproject.toml index 14201e0a91ec..5d1c2c88761c 100644 --- a/packages/googleapis-common-protos/pyproject.toml +++ b/packages/googleapis-common-protos/pyproject.toml @@ -40,7 +40,7 @@ classifiers = [ "Topic :: Internet", ] dependencies = [ - "protobuf >= 4.25.8, < 8.0.0", + "protobuf >= 6.33.5, < 8.0.0", ] [project.urls] diff --git a/packages/googleapis-common-protos/testing/constraints-3.9-python-pubsub.txt b/packages/googleapis-common-protos/testing/constraints-3.9-python-pubsub.txt index 15018df0b603..8829a3297edb 100644 --- a/packages/googleapis-common-protos/testing/constraints-3.9-python-pubsub.txt +++ b/packages/googleapis-common-protos/testing/constraints-3.9-python-pubsub.txt @@ -5,5 +5,5 @@ # # e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", # Then this file should have foo==1.14.0 -protobuf==4.25.8 +protobuf==6.33.5 grpcio==1.51.3 \ No newline at end of file diff --git a/packages/googleapis-common-protos/testing/constraints-3.9.txt b/packages/googleapis-common-protos/testing/constraints-3.9.txt index 78e031894a05..a80820fc3265 100644 --- a/packages/googleapis-common-protos/testing/constraints-3.9.txt +++ b/packages/googleapis-common-protos/testing/constraints-3.9.txt @@ -5,5 +5,5 @@ # # e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", # Then this file should have foo==1.14.0 -protobuf==4.25.8 +protobuf==6.33.5 grpcio==1.44.0 \ No newline at end of file diff --git a/packages/grpc-google-iam-v1/noxfile.py b/packages/grpc-google-iam-v1/noxfile.py index 6d0703ed100b..27ec027fa309 100644 --- a/packages/grpc-google-iam-v1/noxfile.py +++ b/packages/grpc-google-iam-v1/noxfile.py @@ -210,30 +210,16 @@ def install_unittest_dependencies(session, *constraints): @nox.session(python=UNIT_TEST_PYTHON_VERSIONS) @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. session.run( "py.test", @@ -423,7 +409,7 @@ def docfx(session): @nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", - ["python", "upb", "cpp"], + ["python", "upb"], ) def prerelease_deps(session, protobuf_implementation): """ @@ -433,14 +419,6 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - 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", ".") diff --git a/packages/grpc-google-iam-v1/pyproject.toml b/packages/grpc-google-iam-v1/pyproject.toml index d9168e103f28..db219578fe32 100644 --- a/packages/grpc-google-iam-v1/pyproject.toml +++ b/packages/grpc-google-iam-v1/pyproject.toml @@ -42,7 +42,7 @@ classifiers = [ dependencies = [ "grpcio >= 1.44.0, < 2.0.0", "googleapis-common-protos[grpc] >= 1.63.2, < 2.0.0", - "protobuf >= 4.25.8, < 8.0.0", + "protobuf >= 6.33.5, < 8.0.0", ] [project.urls] diff --git a/packages/grpc-google-iam-v1/testing/constraints-3.9-python-pubsub.txt b/packages/grpc-google-iam-v1/testing/constraints-3.9-python-pubsub.txt index b6293bae2f4a..d283572a28e2 100644 --- a/packages/grpc-google-iam-v1/testing/constraints-3.9-python-pubsub.txt +++ b/packages/grpc-google-iam-v1/testing/constraints-3.9-python-pubsub.txt @@ -5,5 +5,5 @@ # # e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", # Then this file should have foo==1.14.0 -protobuf==4.25.8 +protobuf==6.33.5 grpcio==1.51.3 diff --git a/packages/grpc-google-iam-v1/testing/constraints-3.9.txt b/packages/grpc-google-iam-v1/testing/constraints-3.9.txt index 8cd2eb21f15b..b24046275cbe 100644 --- a/packages/grpc-google-iam-v1/testing/constraints-3.9.txt +++ b/packages/grpc-google-iam-v1/testing/constraints-3.9.txt @@ -5,5 +5,5 @@ # # e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", # Then this file should have foo==1.14.0 -protobuf==4.25.8 +protobuf==6.33.5 grpcio==1.44.0 diff --git a/packages/proto-plus/noxfile.py b/packages/proto-plus/noxfile.py index 4e07083cd49c..847092bd314d 100644 --- a/packages/proto-plus/noxfile.py +++ b/packages/proto-plus/noxfile.py @@ -43,20 +43,10 @@ @nox.session(python=PYTHON_VERSIONS) -@nox.parametrize("implementation", ["cpp", "upb", "python"]) +@nox.parametrize("implementation", ["upb", "python"]) def unit(session, implementation): """Run the unit test suite.""" - # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): - # Remove this check once support for Protobuf 3.x is dropped. - if 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" ) @@ -64,11 +54,6 @@ def unit(session, implementation): session.env["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = implementation session.install("coverage", "pytest", "pytest-cov", "pytz") session.install("-e", ".[testing]", "-c", constraints_path) - # TODO(https://github.com/googleapis/proto-plus-python/issues/389): - # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. - # The 'cpp' implementation requires Protobuf<4. - if implementation == "cpp": - session.install("protobuf<4") # TODO(https://github.com/googleapis/proto-plus-python/issues/403): re-enable `-W=error` # The warnings-as-errors flag `-W=error` was removed in diff --git a/packages/proto-plus/pyproject.toml b/packages/proto-plus/pyproject.toml index efe9a2a3b2ec..f5a8cd2545c1 100644 --- a/packages/proto-plus/pyproject.toml +++ b/packages/proto-plus/pyproject.toml @@ -38,7 +38,7 @@ classifiers = [ "Topic :: Software Development :: Code Generators", "Topic :: Software Development :: Libraries :: Python Modules", ] -dependencies = ["protobuf >= 4.25.8, < 8.0.0"] +dependencies = ["protobuf >= 6.33.5, < 8.0.0"] dynamic = ["version"] [project.urls] diff --git a/packages/proto-plus/testing/constraints-3.9.txt b/packages/proto-plus/testing/constraints-3.9.txt index 2aa3356da157..6dd4545011b5 100644 --- a/packages/proto-plus/testing/constraints-3.9.txt +++ b/packages/proto-plus/testing/constraints-3.9.txt @@ -6,4 +6,4 @@ # e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", # Then this file should have foo==1.14.0 google-api-core==2.11.0 -protobuf==4.25.8 +protobuf==6.33.5 diff --git a/packages/proto-plus/tests/test_fields_enum.py b/packages/proto-plus/tests/test_fields_enum.py index de1184b3979e..884449e60863 100644 --- a/packages/proto-plus/tests/test_fields_enum.py +++ b/packages/proto-plus/tests/test_fields_enum.py @@ -357,25 +357,6 @@ class Task(proto.Message): assert t == t2 -if os.environ.get("PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION", "python") == "cpp": - # This test only works, and is only relevant, with the cpp runtime. - # Python just doesn't give a care and lets it work anyway. - def test_enum_alias_bad(): - # Certain enums may shadow the different enum monikers with the same value. - # This is generally discouraged, and protobuf will object by default, - # but will explicitly allow this behavior if the enum is defined with - # the `allow_alias` option set. - with pytest.raises(TypeError): - # The wrapper message is a hack to avoid manifest wrangling to - # define the enum. - class BadMessage(proto.Message): - class BadEnum(proto.Enum): - UNKNOWN = 0 - DEFAULT = 0 - - bad_dup_enum = proto.Field(proto.ENUM, number=1, enum=BadEnum) - - def test_enum_alias_good(): # Have to split good and bad enum alias into two tests so that the generated # file descriptor is properly created.