We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 421fdba commit c424b6fCopy full SHA for c424b6f
src/betterproto/grpc/grpclib_server.py
@@ -1,5 +1,5 @@
1
from abc import ABC
2
-from collections import AsyncIterable
+from collections.abc import AsyncIterable
3
from typing import Callable, Any, Dict
4
5
import grpclib
src/betterproto/plugin/models.py
@@ -653,7 +653,9 @@ def __post_init__(self) -> None:
653
self.output_file.typing_imports.add("AsyncIterable")
654
self.output_file.typing_imports.add("Iterable")
655
self.output_file.typing_imports.add("Union")
656
- if self.server_streaming:
+
657
+ # Required by both client and server
658
+ if self.client_streaming or self.server_streaming:
659
self.output_file.typing_imports.add("AsyncIterator")
660
661
super().__post_init__() # check for unset fields
0 commit comments