Open jonyscathe opened 2 years ago
I'm running into this as well. Thanks for opening the issue!
Best I can do here at the moment is to revert the offending commit. I've pushed 1.24.10 to PyPi for this now. Please let me know if this "fixes" your issue, I'll leave the issue open for a bit.
This isn't working for me, even though in Github it looks correct.
root@30514da15ae0:/# ls /usr/local/lib/python3.10/site-packages/grpc_health-stubs/v1
__init__.pyi health.pyi health_pb2.pyi health_pb2_grpc.pyi
If I install grpc-stubs 1.24.8:
root@0526e361c909:/# ls /usr/local/lib/python3.10/site-packages/grpc_health-stubs/v1
__init__.pyi health.pyi
Yep - still not working for me either.
Despite it looking like health_pb2.pyi and health_pb2_grpc.pyi were deleted from 1.24.9 to 1.24.10 they are still there when I run `pip install grpc-stubs==1.24.10' and only disappear when I run 'pip install grpc-stubs==1.24.8'
Running a pip uninstall and pip install still doesn't get rid of those files - really not sure what has gone wrong here.
Those two files are still in the grpc_stubs-1.24.10.dist-info/RECORD as well: grpc_health-stubs/v1/health_pb2.pyi,sha256=yxZ9PQu3oKjCmaCNFAFz4vkHRN014EYxBnrcPz1zPbc,2101 grpc_health-stubs/v1/health_pb2grpc.pyi,sha256=-N-BDkiOXBEwoE6sSQGDPyL_ECniOuvPJn9INHsPKY,1090
On the other hand - if I take either 1.24.9 or 1.24.10 and modify grpc_health-stubs/v1/health.pyi's line 39 from: ''' def set(self, service: str, status: _health_pb2.HealthCheckResponse.ServingStatus) -> None: ''' to ''' def set(self, service: str, status: _health_pb2.HealthCheckResponse.ServingStatus.ValueType) -> None: '''
Then I get no mypy errors and everything is fine - and I believe that that is the correct type for the set() function.
If you don't see any issues with this change I am happy to make a PR adding health_pb2.pyi and health_pb2_grpc.pyi back in and making that small change to health.pyi. And I believe that will resolve this issue.
Please note that there are now fairly substantial new requirements for PRs to be accepted to this repo (see the README for details). If you're happy to meet those requirements when re-adding health_pb2.pyi
and health_pb2_grpc.pyi
, then by all means re-add them, but I think the minimum viable change is probably just to properly restore to 1.24.8, which it seems like I haven't quite done right by the sounds of it?
Fair enough - there could potentially be further issues with health_pb2.pyi or health_pb2_grpc.pyi and at this point in time I don't have sufficient time to go through them, adding test cases, etc to cover everything within those files.
And yes, it looks as though the 1.24.10 tag doesn't match what is on pypi for 1.24.10
Hi, Just curious about a change in the last release (1.24.9)
After this change, I'm finding it hard to set the status of services without a mypy error.
The code straight from the grpc examples https://github.com/grpc/grpc/blob/master/examples/python/xds/server.py:
Now causes a mypy error of:
I think argument 2 should be a HealthCheckResponse.ServingStatus.ValueType ? Defined in grpc_health-stubs/v1/health.pyi
This never used to cause a problem with health_pb2 stubs missing, but now they are there I am getting this error. Or if I am wrong about that arguments type, how do I now set a servicer status without a mypy error?