Skip to content

Commit 176e4f3

Browse files
berndverstelena-kolevska
authored andcommitted
Downgrade required grpcio and protobuf versions (microsoft#36)
1 parent c449464 commit 176e4f3

File tree

8 files changed

+414
-661
lines changed

8 files changed

+414
-661
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Added `set_custom_status` orchestrator API ([#31](https://github.com/microsoft/durabletask-python/pull/31)) - contributed by [@famarting](https://github.com/famarting)
1313
- Added `purge_orchestration` client API ([#34](https://github.com/microsoft/durabletask-python/pull/34)) - contributed by [@famarting](https://github.com/famarting)
1414

15+
### Changes
16+
17+
- Protos are compiled with gRPC 1.62.3 / protobuf 3.25.X instead of the latest release. This ensures compatibility with a wider range of grpcio versions for better compatibility with other packages / libraries.
18+
1519
### Updates
1620

1721
- Updated `durabletask-protobuf` submodule reference to latest

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ install:
1111
python3 -m pip install .
1212

1313
gen-proto:
14-
# NOTE: There is currently a hand-edit that we make to the generated orchestrator_service_pb2.py file after it's generated to help resolve import problems.
15-
python3 -m grpc_tools.protoc --proto_path=./submodules/durabletask-protobuf/protos --python_out=./durabletask/internal --pyi_out=./durabletask/internal --grpc_python_out=./durabletask/internal orchestrator_service.proto
14+
cp ./submodules/durabletask-protobuf/protos/orchestrator_service.proto durabletask/internal/orchestrator_service.proto
15+
python3 -m grpc_tools.protoc --proto_path=. --python_out=. --pyi_out=. --grpc_python_out=. ./durabletask/internal/orchestrator_service.proto
16+
rm durabletask/internal/*.proto
1617

1718
.PHONY: init test-unit test-e2e gen-proto install

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ git submodule update --init
170170
Once the submodule is available, the corresponding source code can be regenerated using the following command from the project root:
171171

172172
```sh
173+
pip3 install -r dev-requirements.txt
173174
make gen-proto
174175
```
175176

dev-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
grpcio-tools==1.62.3 # 1.62.X is the latest version before protobuf 1.26.X is used which has breaking changes for Python

durabletask/internal/__init__.py

Whitespace-only changes.

durabletask/internal/orchestrator_service_pb2.py

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

durabletask/internal/orchestrator_service_pb2_grpc.py

Lines changed: 215 additions & 458 deletions
Large diffs are not rendered by default.

requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
autopep8
2-
grpcio
3-
grpcio-tools
2+
grpcio>=1.60.0 # 1.60.0 is the version introducing protobuf 1.25.X support, newer versions are backwards compatible
43
protobuf
54
pytest
6-
pytest-cov
5+
pytest-cov

0 commit comments

Comments
 (0)