Skip to content

Commit 2f1684b

Browse files
authored
update dependencies to work with protobuf 5 (microsoft#5195)
Closes microsoft#5074 Signed-off-by: Mohammad Mazraeh <[email protected]>
1 parent 225eb9d commit 2f1684b

15 files changed

+808
-529
lines changed

python/packages/autogen-core/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies = [
1818
"pillow>=11.0.0",
1919
"typing-extensions>=4.0.0",
2020
"pydantic<3.0.0,>=2.10.0",
21-
"protobuf~=4.25.1",
21+
"protobuf~=5.29.3",
2222
"opentelemetry-api>=1.27.0",
2323
"jsonref~=1.1.0",
2424
]

python/packages/autogen-core/tests/protos/serialization_test_pb2.py

+13-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
11
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
22
"""Client and server classes corresponding to protobuf-defined services."""
33
import grpc
4+
import warnings
45

6+
7+
GRPC_GENERATED_VERSION = '1.70.0'
8+
GRPC_VERSION = grpc.__version__
9+
_version_not_supported = False
10+
11+
try:
12+
from grpc._utilities import first_version_is_lower
13+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
14+
except ImportError:
15+
_version_not_supported = True
16+
17+
if _version_not_supported:
18+
raise RuntimeError(
19+
f'The grpc package installed is at version {GRPC_VERSION},'
20+
+ f' but the generated code in serialization_test_pb2_grpc.py depends on'
21+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
22+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24+
)

python/packages/autogen-ext/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ redis = [
5858
]
5959

6060
grpc = [
61-
"grpcio~=1.62.0", # TODO: update this once we have a stable version.
61+
"grpcio~=1.70.0",
6262
]
6363

6464
jupyter-executor = [

python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos/agent_worker_pb2.py

+15-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos/agent_worker_pb2_grpc.py

+119-28
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)