Skip to content

Allow protobuf 7#1610

Merged
tconley1428 merged 2 commits into
mainfrom
allow-protobuf-7
Jun 22, 2026
Merged

Allow protobuf 7#1610
tconley1428 merged 2 commits into
mainfrom
allow-protobuf-7

Conversation

@tconley1428

@tconley1428 tconley1428 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Relax the runtime protobuf and types-protobuf upper bounds to allow protobuf 7.
  • Accept protobuf 7 in the default test environment guard.
  • Relax googleapis-common-protos in the dev group to a protobuf-7-compatible range.
  • Keep proto generation on the existing protobuf 3 toolchain by explicitly downgrading googleapis-common-protos in the proto-generation Docker/CI path before adding protobuf<4.
  • Add a changelog note.
  • Update descriptor-reflection helpers for protobuf 7 type stubs while keeping protobuf 3 runtime compatibility by falling back from is_repeated to label == LABEL_REPEATED.

Closes #1579.

Validation

  • poe lint
  • uv lock --check
  • git diff --check
  • docker build -q -f scripts/_proto/Dockerfile .
  • Locked pre-7 protobuf environment: protobuf 6.33.6, focused tests pass:
    • uv run -m pytest tests/test_converter.py tests/test_service.py tests/api/test_grpc_stub.py tests/nexus/test_temporal_system_nexus.py tests/worker/test_command_aware_visitor.py -q
  • Protobuf 7.35.0 local validation in a throwaway venv with grpcio/grpcio-tools 1.82.0rc1:
    • uv pip check --python /private/tmp/sdk-python-rc-min-venv/bin/python
    • python -m pytest tests/test_converter.py tests/test_service.py tests/api/test_grpc_stub.py -q
    • generated *_pb2.py import sweep had no protobuf-specific failures; the same three missing-module imports exist under protobuf 6.
  • Pre-7 types-protobuf check: types-protobuf==6.32.1.20260221 exposes FieldDescriptor.is_repeated; mypy and basedpyright pass with those stubs.

Note: some optional extras can still force protobuf <7 through their own dependencies, e.g. google-adk via google-cloud-aiplatform. This PR allows protobuf 7 where the dependency graph permits it.

@tconley1428 tconley1428 requested a review from a team as a code owner June 18, 2026 17:15
@tconley1428 tconley1428 force-pushed the allow-protobuf-7 branch 2 times, most recently from a1f9e95 to a27094b Compare June 18, 2026 18:34
@tconley1428 tconley1428 merged commit f129be7 into main Jun 22, 2026
27 of 28 checks passed
@tconley1428 tconley1428 deleted the allow-protobuf-7 branch June 22, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] support protobuf 7

2 participants