Skip to content

Commit 0e89afe

Browse files
committed
GRPC Python definitions updated for Python V3.9.2+
1 parent 8f2aa05 commit 0e89afe

4 files changed

Lines changed: 14 additions & 16 deletions

File tree

‎minimal_python/robotcontrolapp_pb2.py‎

Lines changed: 1 addition & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎minimal_python/robotcontrolapp_pb2.pyi‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ from google.protobuf.internal import containers as _containers
22
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
33
from google.protobuf import descriptor as _descriptor
44
from google.protobuf import message as _message
5-
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
6-
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
5+
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
76

87
DESCRIPTOR: _descriptor.FileDescriptor
98

‎minimal_python/robotcontrolapp_pb2_grpc.py‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55

66
import robotcontrolapp_pb2 as robotcontrolapp__pb2
77

8-
GRPC_GENERATED_VERSION = '1.78.0'
8+
GRPC_GENERATED_VERSION = '1.64.1'
99
GRPC_VERSION = grpc.__version__
10+
EXPECTED_ERROR_RELEASE = '1.65.0'
11+
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
1012
_version_not_supported = False
1113

1214
try:
@@ -16,12 +18,15 @@
1618
_version_not_supported = True
1719

1820
if _version_not_supported:
19-
raise RuntimeError(
21+
warnings.warn(
2022
f'The grpc package installed is at version {GRPC_VERSION},'
21-
+ ' but the generated code in robotcontrolapp_pb2_grpc.py depends on'
23+
+ f' but the generated code in robotcontrolapp_pb2_grpc.py depends on'
2224
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
2325
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
2426
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
27+
+ f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
28+
+ f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
29+
RuntimeWarning
2530
)
2631

2732

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
# Regenerates the GRPC Python definition files. Call this after updating protos/robotcontrolapp.proto
3+
../venv/Scripts/activate.bat
4+
py -V:3.9.2 -m grpc_tools.protoc -Iprotos --python_out=. --pyi_out=. --grpc_python_out=. protos/robotcontrolapp.proto

0 commit comments

Comments
 (0)