v0.11.5
Frequenz Client Base Library Release Notes
Summary
This release makes stream error logs easier to read by keeping each error on a single line.
Bug Fixes
GrpcStreamBroadcasternow logs stream errors on a single line, leaving out the debug string when it only repeats the code and details.
What's Changed
- Reset release notes by @llucax in #294
- Log stream errors on a single line by @cwasicki in #291
- Prepare release notes for v0.11.5 by @llucax in #296
New Contributors
Full Changelog: v0.11.4...v0.11.5
v0.11.4
Frequenz Client Base Library Release Notes
Summary
This release adds support for frequenz-channels v2.0.0, while still supporting v1 (frequenz-channels >= 1.8.0, < 3).
What's Changed
- Reset release notes by @llucax in #280
- Build(deps-dev): bump the patch group with 4 updates by @dependabot[bot] in #283
- Build(deps-dev): bump isort from 9.0.1 to 9.0.2 by @dependabot[bot] in #287
- Build(deps-dev): bump async-solipsism from 0.9 to 0.10 by @dependabot[bot] in #285
- Build(deps-dev): bump black from 26.5.1 to 26.10.1 by @dependabot[bot] in #288
- Build(deps-dev): bump setuptools from 84.0.0 to 84.1.0 by @dependabot[bot] in #289
- Build(deps-dev): bump the minor group across 1 directory with 10 updates by @dependabot[bot] in #290
- Build(deps-dev): bump pydoclint from 0.10.1 to 0.12.0 by @dependabot[bot] in #286
- Allow frequenz-channels v2 by @llucax in #292
- Prepare release notes for v0.11.4 by @llucax in #293
Full Changelog: v0.11.3...v0.11.4
v0.11.3
Frequenz Client Base Library Release Notes
Summary
This release adds support for protobuf 7 and fixes HTTP/2 keep-alive, which was never actually enabled.
Upgrading
- The protobuf requirement is now
>=5.29.2,<8, allowing protobuf 7 while retaining support for protobuf 5 and 6.
Bug Fixes
-
HTTP/2 keep-alive is now actually enabled.
grpc.keepalive_time_msandgrpc.keepalive_timeout_mswere computed withtimedelta.total_seconds() * 1000and therefore passed asfloat. gRPC silently ignores channel arguments that are neitherintnorstr, so no keep-alive pings were ever sent and a client could only detect a dead stream through its own deadline or a teardown sent by the peer.Note that keep-alive pings are answered by the nearest HTTP/2 peer. Where a proxy terminates HTTP/2, successful pings prove that hop is alive, not the backend, so a stream deadline is still needed to detect an orphaned upstream stream.
What's Changed
- Bump pytest from 8.4.2 to 9.0.2 by @dependabot[bot] in #210
- Bump types-protobuf from 6.32.1.20251105 to 6.32.1.20251210 by @dependabot[bot] in #209
- Bump the patch group with 2 updates by @dependabot[bot] in #207
- Add repo-config auto-migration workflow by @llucax in #221
- Bump the patch group across 1 directory with 7 updates by @dependabot[bot] in #223
- Bump frequenz-repo-config from 0.13.8 to 0.17.0 in the repo-config group across 1 directory by @dependabot[bot] in #226
- Bump setuptools-scm from 9.2.2 to 10.0.5 by @dependabot[bot] in #229
- Bump nox from 2025.11.12 to 2026.2.9 by @dependabot[bot] in #230
- Bump the compatible group across 1 directory with 4 updates by @dependabot[bot] in #235
- Bump the minor group with 2 updates by @dependabot[bot] in #225
- Bump mkdocstrings-python from 1.18.2 to 2.0.3 by @dependabot[bot] in #228
- Update protobuf requirement from <7,>=5.29.2 to >=5.29.2,<8 by @dependabot[bot] in #231
- Bump setuptools from 80.9.0 to 82.0.1 by @dependabot[bot] in #232
- Clear release notes by @shsms in #211
- Bump black from 25.12.0 to 26.3.1 by @dependabot[bot] in #227
- Bump mkdocs-gen-files from 0.5.0 to 0.6.1 by @dependabot[bot] in #233
- Build(deps-dev): Bump async-solipsism from 0.8 to 0.9 by @dependabot[bot] in #215
- Build(deps): Bump frequenz-floss/gh-action-setup-git from 16952aac3ccc01d27412fe0dea3ea946530dcace to f9d86a01228ee1cadaac5224d4d7626f1eb23f90 by @dependabot[bot] in #237
- Build(deps): Bump frequenz-floss/gh-action-dependabot-migrate from 1.1.0 to 1.1.1 in the compatible group by @dependabot[bot] in #236
- Build(deps): Bump actions/create-github-app-token from 2.2.1 to 3.1.1 by @dependabot[bot] in #238
- Build(deps): Bump frequenz-floss/gh-action-setup-python-with-deps from 0d0d77eac3b54799f31f25a1060ef2c6ebdf9299 to e4d0b2ef8f5a1612d7827f3abaef17c931d2b946 by @dependabot[bot] in #239
- Build(deps-dev): Bump the patch group with 3 updates by @dependabot[bot] in #240
- Build(deps-dev): Bump the minor group with 2 updates by @dependabot[bot] in #241
- Build(deps-dev): Bump isort from 7.0.0 to 8.0.1 by @dependabot[bot] in #242
- Build(deps-dev): Bump types-protobuf from 6.32.1.20251210 to 7.34.1.20260408 by @dependabot[bot] in #243
- Build(deps-dev): Bump types-markdown from 3.10.2.20260211 to 3.10.2.20260408 by @dependabot[bot] in #244
- Build(deps): Bump the compatible group with 5 updates by @dependabot[bot] in #245
- Build(deps-dev): Bump the minor group with 2 updates by @dependabot[bot] in #246
- Build(deps-dev): Bump types-protobuf from 7.34.1.20260408 to 7.34.1.20260518 by @dependabot[bot] in #248
- Build(deps-dev): Bump mypy from 1.20.2 to 2.1.0 by @dependabot[bot] in #249
- Build(deps-dev): Bump pydoclint from 0.8.3 to 0.8.5 by @dependabot[bot] in #250
- Build(deps-dev): Bump pytest-asyncio from 1.3.0 to 1.4.0 by @dependabot[bot] in #252
- Build(deps-dev): Bump types-markdown from 3.10.2.20260408 to 3.10.2.20260518 by @dependabot[bot] in #251
- Build(deps-dev): Bump frequenz-repo-config from 0.17.0 to 0.18.0 in the repo-config group across 1 directory by @dependabot[bot] in #247
- Bump the compatible group with 2 updates by @dependabot[bot] in #253
- Bump pydoclint from 0.8.5 to 0.8.6 by @dependabot[bot] in #254
- Bump frequenz-floss/gh-action-setup-python-with-deps from 1.0.4 to 1.0.5 in the compatible group by @dependabot[bot] in #255
- Bump actions/checkout from 6.0.3 to 7.0.0 by @dependabot[bot] in #256
- Bump the patch group with 3 updates by @dependabot[bot] in #257
- Bump the minor group with 2 updates by @dependabot[bot] in #258
- Bump pydoclint from 0.8.6 to 0.9.0 by @dependabot[bot] in #259
- Bump the compatible group with 6 updates by @dependabot[bot] in #261
- Bump actions/labeler from 6.1.0 to 7.0.0 by @dependabot[bot] in #262
- Bump the patch group with 3 updates by @dependabot[bot] in #263
- Bump the minor group with 3 updates by @dependabot[bot] in #264
- Bump pydoclint from 0.9.0 to 0.9.1 by @dependabot[bot] in #267
- Bump types-markdown from 3.10.2.20260518 to 3.10.2.20260712 by @dependabot[bot] in #265
- Build(deps-dev): bump setuptools from 82.0.1 to 83.0.0 by @dependabot[bot] in #266
- Fix HTTP/2 keep-alive channel options by @Marenz in #268
- Build(deps-dev): bump the patch group with 4 updates by @dependabot[bot] in #269
- Build(deps-dev): bump the minor group with 3 updates by @dependabot[bot] in #270
- Build(deps-dev): bump setuptools from 83.0.0 to 84.0.0 by @dependabot[bot] in #272
- Build(deps-dev): bump flake8-datetimez from 20.10.0 to 26.8.1 by @dependabot[bot] in #273
- Build(deps-dev): bump isort from 8.0.1 to 9.0.1 by @dependabot[bot] in #274
- Build(deps-dev): bump frequenz-repo-config from 0.18.0 to 0.19.0 in the repo-config group across 1 directory by @dependabot[bot] in #271
- Build(deps-dev): bump the patch group with 2 updates by @dependabot[bot] in #275
- Build(deps-dev): bump the minor group with 5 updates by @dependabot[bot] in #276
- Build(deps-dev): bump pydoclint from 0.9.1 to 0.10.1 by @dependabot[bot] in #277
- Build(deps-dev): bump types-protobuf from 7.35.1.20260827 to 7.35.1.20260906 by @dependabot[bot] in #278
- Prepare release n...
v0.11.2
Frequenz Client Base Library Release Notes
Summary
Upgrading
New Features
Bug Fixes
- This fixes a bug in the
GrpcStreamBroadcasterthat was causing exceptions in the transform method to be silenced.
What's Changed
- Clear release notes by @llucax in #172
- Bump pydoclint from 0.6.11 to 0.7.3 by @dependabot[bot] in #179
- Bump mkdocstrings[python] from 0.30.0 to 0.30.1 in the patch group by @dependabot[bot] in #176
- Bump actions/labeler from 5.0.0 to 6.0.1 by @dependabot[bot] in #175
- Bump pytest-asyncio from 1.1.0 to 1.2.0 by @dependabot[bot] in #178
- Bump the minor group across 1 directory with 11 updates by @dependabot[bot] in #180
- Bump the minor group with 2 updates by @dependabot[bot] in #185
- Bump setuptools-scm[toml] from 8.3.1 to 9.2.2 by @dependabot[bot] in #187
- Bump pydoclint from 0.7.3 to 0.7.6 by @dependabot[bot] in #188
- Bump actions/upload-artifact from 4 to 5 by @dependabot[bot] in #182
- Bump actions/download-artifact from 5 to 6 by @dependabot[bot] in #183
- Bump the patch group with 4 updates by @dependabot[bot] in #184
- Bump pylint from 3.3.7 to 4.0.2 by @dependabot[bot] in #189
- Add Dependabot auto-merge workflow by @Marenz in #181
- Bump isort from 6.1.0 to 7.0.0 by @dependabot[bot] in #186
- Bump actions/checkout from 5 to 6 by @dependabot[bot] in #201
- Bump the patch group with 4 updates by @dependabot[bot] in #191
- Catch and log transform errors in the GrpcStreamBroadcaster by @shsms in #203
- Bump pytest-asyncio from 1.2.0 to 1.3.0 by @dependabot[bot] in #199
- Bump mkdocstrings[python] from 0.30.1 to 1.0.0 by @dependabot[bot] in #194
- Bump types-protobuf from 6.32.1.20250918 to 6.32.1.20251105 by @dependabot[bot] in #198
- Bump frequenz-floss/gh-action-nox from 1.0.1 to 1.1.0 in the compatible group by @dependabot[bot] in #200
- Bump pydoclint from 0.7.6 to 0.8.3 by @dependabot[bot] in #193
- Revert retry strategy changes for streaming by @llucax in #204
- Bump the minor group with 8 updates by @dependabot[bot] in #192
Full Changelog: v0.11.1...v0.11.2
v0.11.1
Frequenz Client Base Library Release Notes
Warning
This version has a bug in the streaming module that makes any stream using GrpcStreamBroadcaster not receive any data. The version was yanked from PyPI and should not be used.
Upgrading
- There is very minor breaking change in this release,
GrpcStreamBroadcasternow requires agrpc.aio.UnaryStreamCallinstead of aAsyncIterablefor thestream_methodargument. In practice all users should be passing agrpc.aio.UnaryStreamCallalready, so this should not affect anyone unless they are doing something very strange.
Bug Fixes
-
GrpcStreamBroadcaster: Fix potential long delays on retries, and giving up early if the number of retries is limited.The retry strategy was not reset after a successful start of the stream, so the back-off delays would accumulate over multiple retries and eventually give up if the number of retries were limited, even if there was a successful start of the stream in between. Now we properly reset the retry strategy after a successful start of the stream (successfully receiving the first item from the stream).
-
GrpcStreamBroadcaster: FixStreamStartedevent firing too soon.The
StreamStartedevent was being fired as soon as the streamming method was called, but that doesn't mean that a streamming connection was established with the server at all, which can give a false impression that the stream is active and working. Now we wait until we receive the initial metadata from the server before firing theStreamStartedevent. That should give users a better indication that the stream is actually active and working without having to wait for the first item to be received, which can take a long time for some low-frequency streams.
What's Changed
- Improve the README by @llucax in #157
- Bump pytest-asyncio from 0.26.0 to 1.0.0 by @dependabot[bot] in #159
- Bump the patch group with 6 updates by @dependabot[bot] in #160
- Bump pytest-asyncio from 1.0.0 to 1.1.0 by @dependabot[bot] in #166
- Bump the compatible group with 2 updates by @dependabot[bot] in #163
- Bump async-solipsism from 0.7 to 0.8 by @dependabot[bot] in #165
- Bump mkdocstrings[python] from 0.29.1 to 0.30.0 in the mkdocstrings group by @dependabot[bot] in #164
- Bump pydoclint from 0.6.6 to 0.6.11 by @dependabot[bot] in #170
- Bump actions/checkout from 4 to 5 by @dependabot[bot] in #171
- Bump actions/download-artifact from 4 to 5 in the artifacts group by @dependabot[bot] in #168
- Bump mkdocstrings-python from 1.16.12 to 1.18.2 in the mkdocstrings group by @dependabot[bot] in #169
- Add missing retry strategy reset in streaming by @llucax in #148
Full Changelog: v0.11.0...v0.11.1
v0.11.0
Frequenz Client Base Library Release Notes
Summary
Upgrading
-
Updated interface and behavior for HMAC
This introduces a new positional argument to
parse_grpc_uri.
If calling this function manually and passingChannelOptions, it is recommended
to switch to passingChannelOptionsvia keyword argument. -
All parameters of the Streamers
new_receivermethod are now keyword-only arguments. This means that you must specify them by name when calling the method, e.g.:recv = streamer.new_receiver(max_size=50, warn_on_overflow=True)
New Features
-
The streaming client, when using
new_receiver(include_events=True), will now return a receiver that yields stream notification events, such asStreamStarted,StreamRetrying, andStreamFatalError. This allows you to monitor the state of the stream:recv = streamer.new_receiver(include_events=True) for msg in recv: match msg: case StreamStarted(): print("Stream started") case StreamRetrying(delay, error): print(f"Stream stopped and will retry in {delay}: {error or 'closed'}") case StreamFatalError(error): print(f"Stream will stop because of a fatal error: {error}") case int() as output: print(f"Received message: {output}")
Bug Fixes
What's Changed
- Reset release notes by @florian-wagner-frequenz in #144
- Streamer: Write out events on the channels as well by @Marenz in #146
- Update release notes formatting by @Marenz in #147
- Improve streamer events by @llucax in #149
- Bump the patch group with 6 updates by @dependabot in #150
- Bump the minor group with 3 updates by @dependabot in #151
- Bump types-protobuf from 5.29.1.20250403 to 6.30.2.20250516 by @dependabot in #152
- Streaming: Make events optional by @Marenz in #154
- Change interface for HMAC by @florian-wagner-frequenz in #145
- Make parameters named of new_receiver by @Marenz in #155
Full Changelog: v0.10.0...v0.11.0
v0.10.0
Frequenz Client Base Library Release Notes
Features
- Added support for HMAC signing of
UnaryUnaryclient messages - Added support for HMAC signing of
UnaryStreamclient messages
Upgrading
- Updated
protobufdependency range: changed from>=4.21.6, <6to>=5.29.2, <7 - The minimum dependency for
typing-extensionsis now4.6.0to be compatible with Python 3.12 - The minimum dependency for
grpciois now1.59to be compatible with Python 3.12
Bug Fixes
-
Fixed keys of signature to match what fuse-rs expects
-
GrpcStreamBroadcasterwill now correctly try to restart on unexpected errors.Before if an unexpected exception was raised by the stream method, the
internal task would silently finish and never start again.
What's Changed
- Bump types-protobuf from 5.29.1.20241207 to 5.29.1.20250208 by @dependabot in #115
- Bump nox from 2024.10.9 to 2025.2.9 by @dependabot in #116
- Log when stopping
GrpcStreamBroadcasterinstances by @shsms in #118 - Upgrade
protobufdependency range from>=4.21.6, <6to>=5.29.2, <7by @camille-bouvy-frequenz in #119 - Prepare release notes for release v0.10.0 by @camille-bouvy-frequenz in #120
- Implement HMAC for metadata by @florian-wagner-frequenz in #121
- Update to repo-config v0.13.2 by @llucax in #125
- Bump the minimum dependency of
grpcioby @llucax in #132 - Bump the patch group with 5 updates by @dependabot in #126
- Bump the minor group with 6 updates by @dependabot in #127
- Bump pytest-asyncio from 0.25.3 to 0.26.0 by @dependabot in #130
- Bump pydoclint from 0.6.0 to 0.6.5 by @dependabot in #131
- Bump types-protobuf from 5.29.1.20250208 to 5.29.1.20250403 by @dependabot in #128
- Bump setuptools from 75.8.0 to 78.1.0 by @dependabot in #129
- Bump setuptools from 78.1.0 to 80.1.0 by @dependabot in #137
- Bump pydoclint from 0.6.5 to 0.6.6 by @dependabot in #135
- Bump grpc-stubs from 1.53.0.5 to 1.53.0.6 by @dependabot in #136
- Bump the patch group with 4 updates by @dependabot in #133
- Bump the minor group across 1 directory with 3 updates by @dependabot in #138
- Bring the metadata keys in line with the server by @florian-wagner-frequenz in #140
- Add interceptors for stream requests by @florian-wagner-frequenz in #142
- Fix handling of unexpected exceptions in
GrpcStreamBroadcasterby @llucax in #143
New Contributors
- @florian-wagner-frequenz made their first contribution in #121
Full Changelog: v0.9.0...v0.10.0
v0.9.0
Frequenz Client Base Library Release Notes
Upgrading
- The minimum required version of
frequenz-channelsis nowv1.6.1.
New Features
- Add the
warn_on_overflowoption to the streaming receivers to allow ignoring overflow warnings
What's Changed
- Bump the required group with 6 updates by @dependabot in #100
- Bump setuptools from 68.1.0 to 75.6.0 by @dependabot in #102
- Bump setuptools-scm[toml] from 7.1.0 to 8.1.0 by @dependabot in #101
- Apply new repo-config 0.11 templates by @llucax in #103
- Bump the required group with 2 updates by @dependabot in #104
- Bump types-markdown from 3.7.0.20240822 to 3.7.0.20241204 by @dependabot in #106
- Bump types-protobuf from 5.28.3.20241030 to 5.28.3.20241203 by @dependabot in #105
- Bump the required group with 8 updates by @dependabot in #107
- Bump the required group with 6 updates by @dependabot in #109
- Bump black from 24.10.0 to 25.1.0 by @dependabot in #110
- Bump isort from 5.13.2 to 6.0.0 by @dependabot in #111
- Add the
warn_on_overflowoption on the streaming receivers by @camille-bouvy-frequenz in #112 - Prepare release notes for release v0.9.0 by @camille-bouvy-frequenz in #113
New Contributors
- @camille-bouvy-frequenz made their first contribution in #112
Full Changelog: v0.8.1...v0.9.0
v0.8.1
Frequenz Client Base Library Release Notes
Summary
This release adds some arguments that were missing in the parse_grpc_uri() function's documentation.
What's Changed
- Clear release notes by @llucax in #97
- Remove unnecessary --platform flag in Dockerfile by @llucax in #98
- Update
parse_grpc_uridocs with keep-alive params by @shsms in #99
Full Changelog: v0.8.0...v0.8.1
v0.8.0
Frequenz Client Base Library Release Notes
Upgrading
The BaseApiClient class is generic again. There was too many issues with the new approach, so it was rolled back.
-
If you are upgrading from v0.7.x, you should be able to roll back your changes with the upgrade and just keep the new
stubproperty.# Old from __future__ import annotations import my_service_pb2_grpc class MyApiClient(BaseApiClient): def __init__(self, server_url: str, *, ...) -> None: super().__init__(server_url, ...) stub = my_service_pb2_grpc.MyServiceStub(self.channel) self._stub: my_service_pb2_grpc.MyServiceAsyncStub = stub # type: ignore ... @property def stub(self) -> my_service_pb2_grpc.MyServiceAsyncStub: if self.channel is None: raise ClientNotConnected(server_url=self.server_url, operation="stub") return self._stub # New from __future__ import annotations import my_service_pb2_grpc from my_service_pb2_grpc import MyServiceStub class MyApiClient(BaseApiClient[MyServiceStub]): def __init__(self, server_url: str, *, ...) -> None: super().__init__(server_url, MyServiceStub, ...) ... @property def stub(self) -> my_service_pb2_grpc.MyServiceAsyncStub: """The gRPC stub for the API.""" if self.channel is None or self._stub is None: raise ClientNotConnected(server_url=self.server_url, operation="stub") # This type: ignore is needed because we need to cast the sync stub to # the async stub, but we can't use cast because the async stub doesn't # actually exists to the eyes of the interpreter, it only exists for the # type-checker, so it can only be used for type hints. return self._stub # type: ignore
-
If you are upgrading from v0.6.x, you should only need to add the
stubproperty to your client class and then use that property instead of_stubin your code.@property def stub(self) -> my_service_pb2_grpc.MyServiceAsyncStub: """The gRPC stub for the API.""" if self.channel is None or self._stub is None: raise ClientNotConnected(server_url=self.server_url, operation="stub") # This type: ignore is needed because we need to cast the sync stub to # the async stub, but we can't use cast because the async stub doesn't # actually exists to the eyes of the interpreter, it only exists for the # type-checker, so it can only be used for type hints. return self._stub # type: ignore
What's Changed
- Clear release notes by @shsms in #94
- Bump the required group with 9 updates by @dependabot in #95
- Revert "Remove generic type from
BaseApiClient" by @llucax in #96
Full Changelog: v0.7.0...v0.8.0