Skip to content

Commit

Permalink
update dependencies to work with protobuf 5 (#5195)
Browse files Browse the repository at this point in the history
Closes #5074

Signed-off-by: Mohammad Mazraeh <[email protected]>
MohMaz authored Jan 29, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 225eb9d commit 2f1684b
Showing 15 changed files with 808 additions and 529 deletions.
2 changes: 1 addition & 1 deletion python/packages/autogen-core/pyproject.toml
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ dependencies = [
"pillow>=11.0.0",
"typing-extensions>=4.0.0",
"pydantic<3.0.0,>=2.10.0",
"protobuf~=4.25.1",
"protobuf~=5.29.3",
"opentelemetry-api>=1.27.0",
"jsonref~=1.1.0",
]

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings


GRPC_GENERATED_VERSION = '1.70.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True

if _version_not_supported:
raise RuntimeError(
f'The grpc package installed is at version {GRPC_VERSION},'
+ f' but the generated code in serialization_test_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
)
2 changes: 1 addition & 1 deletion python/packages/autogen-ext/pyproject.toml
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ redis = [
]

grpc = [
"grpcio~=1.62.0", # TODO: update this once we have a stable version.
"grpcio~=1.70.0",
]

jupyter-executor = [

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 19 additions & 10 deletions python/packages/autogen-ext/tests/protos/serialization_test_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ dev = [
"pytest_mock",
"poethepoet",
"packaging",
"grpcio-tools~=1.62.0",
"grpcio-tools~=1.70.0",
"mypy-protobuf",
"cookiecutter",
"poethepoet",
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings


GRPC_GENERATED_VERSION = '1.70.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True

if _version_not_supported:
raise RuntimeError(
f'The grpc package installed is at version {GRPC_VERSION},'
+ f' but the generated code in agent_events_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
)
999 changes: 532 additions & 467 deletions python/uv.lock

Large diffs are not rendered by default.

0 comments on commit 2f1684b

Please sign in to comment.