Closed efokschaner closed 2 years ago
In a project using grpclib, I noticed that upgrading mypy from 0.942 to 0.950, causes an error regarding grpclib.server.Server:
grpclib.server.Server
error: Cannot instantiate abstract class "Server" with abstract attributes "get_loop", "is_serving", "serve_forever" and "start_serving" [abstract]
Locally I am working around this with
server = Server(services) # type: ignore[abstract]
It seems grpc's own tests are run on mypy 0.931 https://github.com/vmagamedov/grpclib/blob/39cc61ad45cd3be15ec464fdefab31b9f4f23918/requirements/check.txt#L18 and might reproduce the issue too if that was bumped.
Do you think that grpclib should somehow satisfy mypy? Or is mypy being over-zealous?
Either way, it's definitely preferable to not have this error show up for people just using grpclib as recommended.
LMK if you have more questions and thanks for maintaining this useful library!
Thanks, I'll take a look.
Fixed in d3fae8549ae18c17f9f385519eeb3427708188c4
In a project using grpclib, I noticed that upgrading mypy from 0.942 to 0.950, causes an error regarding
grpclib.server.Server
:Locally I am working around this with
It seems grpc's own tests are run on mypy 0.931 https://github.com/vmagamedov/grpclib/blob/39cc61ad45cd3be15ec464fdefab31b9f4f23918/requirements/check.txt#L18 and might reproduce the issue too if that was bumped.
Do you think that grpclib should somehow satisfy mypy? Or is mypy being over-zealous?
Either way, it's definitely preferable to not have this error show up for people just using grpclib as recommended.
LMK if you have more questions and thanks for maintaining this useful library!