Skip to content

[grpcio] Add add_registered_method_handlers to Server - #16565

Merged
JelleZijlstra merged 1 commit into
python:mainfrom
Blacksujit:grpcio-add-registered-method-handlers
Oct 19, 2026
Merged

JelleZijlstra merged 1 commit into
python:mainfrom
Blacksujit:grpcio-add-registered-method-handlers

Conversation

@Blacksujit

Copy link
Copy Markdown
Contributor

grpc.Server and grpc.aio.Server were missing add_registered_method_handlers, which code generated by grpcio-tools calls when registering a servicer (server.add_registered_method_handlers(...)).

This adds the method to both server interfaces. The runtime only iterates method_handlers.items(), so it is typed as a Mapping.

Upstream (v1.84.0):

AI agent used: Claude Code (claude-opus-5-5).

@github-actions

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

scipy-stubs (https://github.com/scipy/scipy-stubs)
- tests/misc/test_submodules_empty.pyi:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

@JelleZijlstra
JelleZijlstra merged commit 0069c3c into python:main Oct 19, 2026
74 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