Skip to content

feat(python): add async grpc mode for python#3768

Merged
chaokunyang merged 3 commits into
apache:mainfrom
chaokunyang:python_grpc_async_support
Jun 17, 2026
Merged

feat(python): add async grpc mode for python#3768
chaokunyang merged 3 commits into
apache:mainfrom
chaokunyang:python_grpc_async_support

Conversation

@chaokunyang

@chaokunyang chaokunyang commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Why?

Python gRPC service generation needs first-class AsyncIO support while still allowing existing synchronous grpcio applications to generate sync-compatible companions.

What does this PR do?

  • Defaults generated Python gRPC companions to grpc.aio servicers and async request handling.
  • Adds --grpc-python-mode={async,sync} for choosing Python gRPC API mode, with CLI validation that the option is only used with Python --grpc output.
  • Keeps synchronous Python gRPC generation available through explicit sync mode.
  • Updates compiler tests, generated-code docs, compiler guide pages, and language gRPC support docs for the new Python mode behavior.
  • Splits Java/Python gRPC interop coverage into async and sync Python peers, shares common test values, and updates CI/test class names.

Related issues

#3273

AI Contribution Checklist

  • Substantial AI assistance was used in this PR: yes / no
  • If yes, I included a completed AI Contribution Checklist in this PR description and the required AI Usage Disclosure.
  • If yes, my PR description includes the required ai_review summary and screenshot evidence of the final clean AI review results from both fresh reviewers on the current PR diff or current HEAD after the latest code changes.

Does this PR introduce any user-facing change?

  • Does this PR introduce any public API change?
  • Does this PR introduce any binary protocol compatibility change?

Benchmark

@chaokunyang chaokunyang merged commit 669de50 into apache:main Jun 17, 2026
56 checks passed
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.

2 participants