Skip to content

Commit 80d69c6

Browse files
committed
Bump the frequenz-api-common dependency to 0.6.0
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent f2312e6 commit 80d69c6

File tree

5 files changed

+37
-6
lines changed

5 files changed

+37
-6
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* Group GitHub Actions dependabot updates.
2222
* API projects don't include the `google-common-protos` dependency by default.
2323
* API projects updated the `grpcio` dependency to `1.66.1`.
24+
* API projects updated the `frequenz-api-common` dependency to `0.6`.
2425

2526
## Bug Fixes
2627

cookiecutter/{{cookiecutter.github_repo_name}}/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ plugins:
124124
- https://frequenz-floss.github.io/frequenz-channels-python/v0.16/objects.inv
125125
- https://frequenz-floss.github.io/frequenz-sdk-python/v0.25/objects.inv
126126
{%- elif cookiecutter.type == "api" %}
127-
- https://frequenz-floss.github.io/frequenz-api-common/v0.3/objects.inv
127+
- https://frequenz-floss.github.io/frequenz-api-common/v0.6/objects.inv
128128
- https://grpc.github.io/grpc/python/objects.inv
129129
{%- endif %}
130130
- https://typing-extensions.readthedocs.io/en/stable/objects.inv

cookiecutter/{{cookiecutter.github_repo_name}}/pyproject.toml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ requires = [
66
"setuptools == 70.1.1",
77
"setuptools_scm[toml] == 8.1.0",
88
"frequenz-repo-config[{{cookiecutter.type}}] == 0.10.0",
9+
{%- if cookiecutter.type == "api" %}
10+
# We need to pin the protobuf, grpcio and grpcio-tools dependencies to make
11+
# sure the code is generated using the minimum supported versions, as older
12+
# versions can't work with code that was generated with newer versions.
13+
# https://protobuf.dev/support/cross-version-runtime-guarantee/#backwards
14+
"protobuf == 5.28.0",
15+
"grpcio-tools == 1.66.1",
16+
"grpcio == 1.66.1",
17+
{%- endif %}
918
]
1019
build-backend = "setuptools.build_meta"
1120

@@ -43,8 +52,15 @@ dependencies = [
4352
]
4453
{%- elif cookiecutter.type == "api" %}
4554
dependencies = [
46-
"frequenz-api-common >= 0.5.0, < 0.6.0",
47-
"grpcio >= 1.66.1, < 2",
55+
"frequenz-api-common >= 0.6.2, < 0.7.0",
56+
# We can't widen beyond the current value unless we bump the minimum
57+
# requirements too because of protobuf cross-version runtime guarantees:
58+
# https://protobuf.dev/support/cross-version-runtime-guarantee/#major
59+
"protobuf >= 5.28.0, < 7", # Do not widen beyond 7!
60+
# We couldn't find any document with a spec about the cross-version runtime
61+
# guarantee for grpcio, so unless we find one in the future, we'll assume
62+
# major version jumps are not compatible
63+
"grpcio >= 1.66.1, < 2", # Do not widen beyond 2!
4864
]
4965
{%- else %}
5066
dependencies = [

tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ plugins:
120120
# TODO(cookiecutter): You might want to add other external references here
121121
# See https://mkdocstrings.github.io/python/usage/#import for details
122122
- https://docs.python.org/3/objects.inv
123-
- https://frequenz-floss.github.io/frequenz-api-common/v0.3/objects.inv
123+
- https://frequenz-floss.github.io/frequenz-api-common/v0.6/objects.inv
124124
- https://grpc.github.io/grpc/python/objects.inv
125125
- https://typing-extensions.readthedocs.io/en/stable/objects.inv
126126
# Note this plugin must be loaded after mkdocstrings to be able to use macros

tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/pyproject.toml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ requires = [
66
"setuptools == 70.1.1",
77
"setuptools_scm[toml] == 8.1.0",
88
"frequenz-repo-config[api] == 0.10.0",
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 == 5.28.0",
14+
"grpcio-tools == 1.66.1",
15+
"grpcio == 1.66.1",
916
]
1017
build-backend = "setuptools.build_meta"
1118

@@ -28,8 +35,15 @@ classifiers = [
2835
requires-python = ">= 3.11, < 4"
2936
# TODO(cookiecutter): Remove and add more dependencies if appropriate
3037
dependencies = [
31-
"frequenz-api-common >= 0.5.0, < 0.6.0",
32-
"grpcio >= 1.66.1, < 2",
38+
"frequenz-api-common >= 0.6.2, < 0.7.0",
39+
# We can't widen beyond the current value unless we bump the minimum
40+
# requirements too because of protobuf cross-version runtime guarantees:
41+
# https://protobuf.dev/support/cross-version-runtime-guarantee/#major
42+
"protobuf >= 5.28.0, < 7", # Do not widen beyond 7!
43+
# We couldn't find any document with a spec about the cross-version runtime
44+
# guarantee for grpcio, so unless we find one in the future, we'll assume
45+
# major version jumps are not compatible
46+
"grpcio >= 1.66.1, < 2", # Do not widen beyond 2!
3347
]
3448
dynamic = ["version"]
3549

0 commit comments

Comments
 (0)