@@ -6,6 +6,13 @@ requires = [
66 " setuptools == 68.1.0" ,
77 " setuptools_scm[toml] == 7.1.0" ,
88 " frequenz-repo-config[api] == 0.9.2" ,
9+ # We need to pin the protobuf, grpcio and grpcio-tools dependencies to make
10+ # sure the code is generated using the minimum supported versions, as older
11+ # versions can't work with code that was generated with newer versions.
12+ # https://protobuf.dev/support/cross-version-runtime-guarantee/#backwards
13+ " protobuf == 4.25.3" ,
14+ " grpcio-tools == 1.51.1" ,
15+ " grpcio == 1.51.1" ,
916]
1017build-backend = " setuptools.build_meta"
1118
@@ -25,7 +32,15 @@ classifiers = [
2532 " Typing :: Typed" ,
2633]
2734requires-python = " >= 3.11, < 4"
28- dependencies = [" grpcio >= 1.51.1, < 2" , " protobuf >= 4.25.3, < 6" ]
35+ dependencies = [
36+ # We can't widen beyond 6 because of protobuf cross-version runtime guarantees
37+ # https://protobuf.dev/support/cross-version-runtime-guarantee/#major
38+ " protobuf >= 4.25.3, < 6" , # Do not widen beyond 6!
39+ # We couldn't find any document with a spec about the cross-version runtime
40+ # guarantee for grpcio, so unless we find one in the future, we'll assume
41+ # major version jumps are not compatible
42+ " grpcio >= 1.51.1, < 2" , # Do not widen beyond 2!
43+ ]
2944dynamic = [" version" ]
3045
3146[[project .authors ]]
0 commit comments