Skip to content

Commit

Permalink
feat(grpc-asyncio): bump grpcio version
Browse files Browse the repository at this point in the history
Bump grpcio to latest version (1.66.1) to include both type hint
generation and asyncio support.

Also remove explicit dependency on protobuf and use it indirect
from grpcio to avoid version mismatch warnings.
  • Loading branch information
joekickass committed Sep 16, 2024
1 parent c30c04a commit 4439fbb
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 155 deletions.
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.8
3.10
7 changes: 4 additions & 3 deletions protos/diagnostics_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ message LinkTimers {
* received first frame with flow control for receiver (N_Br according to ISO-15765-2).
* Defaults to 0.
*/
int64 delayResponse = 4;
int64 delayResponse = 4;
}

message PublisherConfig {
Expand Down Expand Up @@ -54,6 +54,7 @@ message SubscriberConfig {
}

message Payload {
// TODO: We should rename the field to not have the same name as the type
bytes bytes = 1;
}

Expand All @@ -62,11 +63,11 @@ message Link {
* Identifier of subscriber, typically your app identifier. Published signals
* with same identifier will not trigger callback.
*/
base.ClientId clientId = 1;
base.ClientId clientId = 1;
/**
* Uplink for intended target
* This is optional for SubscribeMultiFrame, not setting this will effectively result in sniff_mode, where no control frames are sent.
*/
base.SignalId publishSignal = 2; /// Uplink for intended target
base.SignalId subscribeSignal = 3; /// Downlink where response is expected
}
}
3 changes: 1 addition & 2 deletions python/remotivelabs-broker/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ function generate_protobuf_files() {
--proto_path=$PROTO_IN \
--python_out=$PROTO_STUBS_OUT \
--grpc_python_out=$PROTO_STUBS_OUT \
--mypy_out=$PROTO_STUBS_OUT \
--mypy_grpc_out=$PROTO_STUBS_OUT \
--pyi_out=$PROTO_STUBS_OUT \
$PROTO_IN/*.proto

# Note: protobuf compiler does not support generating relative or custom absolute imports for python. Use a script to do this manually...
Expand Down
1 change: 0 additions & 1 deletion python/remotivelabs-broker/misc/fix_import_statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

# You can manually specify the number of replacements by changing the 4th argument
for file in files:
print(f"fixing imports in file {file}")
with open(file, encoding="utf-8") as stream:
contents = stream.read()
result = re.sub(REGEX_STRING, SUBSTITUTE_STRING, contents, count=0, flags=re.MULTILINE)
Expand Down
Loading

0 comments on commit 4439fbb

Please sign in to comment.