Skip to content

Commit df741be

Browse files
committed
Regenerated the vendored stream protos for protobuf 3.
This package has to load on a protobuf 3 runtime, and generated code refuses to load on a runtime older than the one it was built against. The protoc of that generation has no `--pyi_out`, so the stubs come from `mypy-protobuf`, which is what the other generated protos already use.
1 parent 3081eb2 commit df741be

19 files changed

Lines changed: 3550 additions & 1130 deletions

‎scripts/gen_stream_protos.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
Run it with an interpreter whose ``grpcio-tools`` matches the oldest protobuf
1010
runtime this package has to load on. Generated code refuses to load on a
1111
runtime older than the one it was built against, and these modules end up in
12-
applications that pin protobuf themselves.
12+
applications that pin protobuf themselves. The stubs come from
13+
``mypy-protobuf`` rather than protoc's own ``--pyi_out``, which that
14+
generation of protoc does not have.
1315
1416
Two rewrites make the copies compile against this SDK. The server's own
1517
routing and API-category options are dropped, because they mean nothing to a
@@ -119,8 +121,9 @@ def main() -> None:
119121
f"--proto_path={work}",
120122
f"--proto_path={api_proto_path()}",
121123
f"--python_out={out}",
122-
f"--pyi_out={out}",
123124
f"--grpc_python_out={out}",
125+
f"--mypy_out={out}",
126+
f"--mypy_grpc_out={out}",
124127
*targets,
125128
],
126129
check=True,

‎temporalio/api/streamservice/v1/__init__.py‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
AddWorkflowMessagesInput,
2020
AddWorkflowMessagesRequest,
2121
AddWorkflowMessagesResponse,
22+
AdvanceConsumerHeadInput,
23+
AdvanceConsumerHeadOutput,
24+
AdvanceConsumerHeadRequest,
25+
AdvanceConsumerHeadResponse,
2226
CloseStreamInput,
2327
CloseStreamOutput,
2428
CloseStreamRequest,
@@ -53,6 +57,10 @@
5357
PollWorkflowMessagesInput,
5458
PollWorkflowMessagesRequest,
5559
PollWorkflowMessagesResponse,
60+
RegisterStreamConsumerInput,
61+
RegisterStreamConsumerOutput,
62+
RegisterStreamConsumerRequest,
63+
RegisterStreamConsumerResponse,
5664
StreamListEntry,
5765
SubscribeWorkflowInput,
5866
SubscribeWorkflowOutput,
@@ -79,6 +87,10 @@
7987
"AddWorkflowMessagesInput",
8088
"AddWorkflowMessagesRequest",
8189
"AddWorkflowMessagesResponse",
90+
"AdvanceConsumerHeadInput",
91+
"AdvanceConsumerHeadOutput",
92+
"AdvanceConsumerHeadRequest",
93+
"AdvanceConsumerHeadResponse",
8294
"CloseStreamInput",
8395
"CloseStreamOutput",
8496
"CloseStreamRequest",
@@ -115,6 +127,10 @@
115127
"PollWorkflowMessagesRequest",
116128
"PollWorkflowMessagesResponse",
117129
"ProducerCursor",
130+
"RegisterStreamConsumerInput",
131+
"RegisterStreamConsumerOutput",
132+
"RegisterStreamConsumerRequest",
133+
"RegisterStreamConsumerResponse",
118134
"STREAM_MESSAGE_KIND_DATA",
119135
"STREAM_MESSAGE_KIND_FLUSH",
120136
"STREAM_MESSAGE_KIND_UNSPECIFIED",

‎temporalio/api/streamservice/v1/message_pb2.py‎

Lines changed: 58 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)