Skip to content

Added missing methods of grpc_health.v1.health_pb2_grpc.HealthStub - #16903

Merged
srittau merged 1 commit into
python:mainfrom
dannyboywoop:grpcio-health-checking-client-stub-fix
Nov 25, 2026
Merged

srittau merged 1 commit into
python:mainfrom
dannyboywoop:grpcio-health-checking-client-stub-fix

Conversation

@dannyboywoop

@dannyboywoop dannyboywoop commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds (incomplete) stubs for the gRPC methods provided by the HealthStub class in grpc_health.v1.health_pb2_grpc.
The corresponding protobuf file is here: https://github.com/grpc/grpc-proto/blob/master/grpc/health/v1/health.proto

This resolves the following mypy issue when using the library:

error: "HealthStub" has no attribute "Check"  [attr-defined]
return self._health_stub.Check(request)

I followed the pattern used for grpcio_channelz.v1.channelz_pb2_grpc.pyi for this:

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
srittau merged commit 4a63cb0 into python:main Nov 25, 2026
74 checks passed
@dannyboywoop
dannyboywoop deleted the grpcio-health-checking-client-stub-fix branch November 25, 2026 12:30
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