Skip to content

Commit fba8152

Browse files
authored
Bump protobuf-related dependencies (#315)
Also ignore warnings about protobuf gencode version, as it is guaranteed by protobuf that 2 consecutive major versions are compatible. We are aware that after that we need to update the depencencies, and we'll get an error if we forget anyways.
2 parents f5c4161 + 7d04779 commit fba8152

File tree

2 files changed

+25
-16
lines changed

2 files changed

+25
-16
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ env:
2525
jobs:
2626
protolint:
2727
name: Check proto files with protolint
28-
runs-on: ubuntu-20.04
28+
runs-on: ubuntu-24.04
2929

3030
steps:
3131
- name: Fetch sources
@@ -48,7 +48,7 @@ jobs:
4848

4949
protoc:
5050
name: Test with protoc
51-
runs-on: ubuntu-20.04
51+
runs-on: ubuntu-24.04
5252
steps:
5353
- name: Fetch sources
5454
uses: actions/checkout@v4
@@ -78,7 +78,7 @@ jobs:
7878
fail-fast: false
7979
matrix:
8080
os:
81-
- ubuntu-20.04
81+
- ubuntu-24.04
8282
python:
8383
- "3.11"
8484
nox-session:
@@ -130,7 +130,7 @@ jobs:
130130

131131
build:
132132
name: Build distribution packages
133-
runs-on: ubuntu-20.04
133+
runs-on: ubuntu-24.04
134134
steps:
135135
- name: Fetch sources
136136
uses: actions/checkout@v4
@@ -162,7 +162,7 @@ jobs:
162162
test-docs:
163163
name: Test documentation website generation
164164
if: github.event_name != 'push'
165-
runs-on: ubuntu-20.04
165+
runs-on: ubuntu-24.04
166166
steps:
167167
- name: Fetch sources
168168
uses: actions/checkout@v4
@@ -202,7 +202,7 @@ jobs:
202202
name: Publish documentation website to GitHub pages
203203
needs: ["nox", "build", "protolint"]
204204
if: github.event_name == 'push'
205-
runs-on: ubuntu-20.04
205+
runs-on: ubuntu-24.04
206206
permissions:
207207
contents: write
208208
steps:
@@ -289,7 +289,7 @@ jobs:
289289
# discussions to create the release announcement in the discussion forums
290290
contents: write
291291
discussions: write
292-
runs-on: ubuntu-20.04
292+
runs-on: ubuntu-24.04
293293
steps:
294294
- name: Download distribution files
295295
uses: actions/download-artifact@v4
@@ -331,7 +331,7 @@ jobs:
331331
publish-to-pypi:
332332
name: Publish packages to PyPI
333333
needs: ["create-github-release"]
334-
runs-on: ubuntu-20.04
334+
runs-on: ubuntu-24.04
335335
permissions:
336336
# For trusted publishing. See:
337337
# https://blog.pypi.org/posts/2023-04-20-introducing-trusted-publishers/

pyproject.toml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ requires = [
1010
# sure the code is generated using the minimum supported versions, as older
1111
# versions can't work with code that was generated with newer versions.
1212
# 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",
13+
"protobuf == 6.31.1",
14+
"grpcio-tools == 1.72.1",
15+
"grpcio == 1.72.1",
1616
]
1717
build-backend = "setuptools.build_meta"
1818

@@ -33,15 +33,15 @@ classifiers = [
3333
]
3434
requires-python = ">= 3.11, < 4"
3535
dependencies = [
36-
"frequenz-api-common >= 0.6.2, < 0.7",
37-
"googleapis-common-protos >= 1.56.4, < 2",
36+
"frequenz-api-common >= 0.6.5, < 0.7",
37+
"googleapis-common-protos >= 1.70.0, < 2",
3838
# We can't widen beyond 6 because of protobuf cross-version runtime guarantees
3939
# https://protobuf.dev/support/cross-version-runtime-guarantee/#major
40-
"protobuf >= 4.25.3, < 6", # Do not widen beyond 6!
40+
"protobuf >= 6.31.1, < 8", # Do not widen beyond 8!
4141
# We couldn't find any document with a spec about the cross-version runtime
4242
# guarantee for grpcio, so unless we find one in the future, we'll assume
4343
# major version jumps are not compatible
44-
"grpcio >= 1.51.1, < 2", # Do not widen beyond 2!
44+
"grpcio >= 1.72.1, < 2", # Do not widen beyond 2!
4545
]
4646
dynamic = ["version"]
4747

@@ -53,7 +53,7 @@ email = "floss@frequenz.com"
5353
dev-flake8 = [
5454
"flake8 == 7.0.0",
5555
"flake8-docstrings == 1.7.0",
56-
"flake8-pyproject == 1.2.3", # For reading the flake8 config from pyproject.toml
56+
"flake8-pyproject == 1.2.3", # For reading the flake8 config from pyproject.toml
5757
"pydoclint == 0.4.1",
5858
"pydocstyle == 6.3.0",
5959
]
@@ -143,6 +143,15 @@ disable = [
143143
]
144144

145145
[tool.pytest.ini_options]
146+
addopts = "-vv"
147+
filterwarnings = [
148+
"error",
149+
"once::DeprecationWarning",
150+
"once::PendingDeprecationWarning",
151+
# We use a raw string (single quote) to avoid the need to escape special
152+
# chars as this is a regex
153+
'ignore:Protobuf gencode version .*exactly one major version older.*:UserWarning',
154+
]
146155
testpaths = ["pytests"]
147156

148157
[tool.mypy]

0 commit comments

Comments
 (0)