Skip to content

Commit 1d56ac7

Browse files
committed
Update release notes
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
1 parent 697a22e commit 1d56ac7

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

‎RELEASE_NOTES.md‎

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,38 @@
66

77
## Upgrading
88

9-
<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
9+
* The `UNSPECIFIED` members in the following enums are now deprecated:
10+
11+
* `frequenz.client.common.grid.EnergyMarketCodeType`
12+
* `frequenz.client.common.metrics.Metric`
13+
* `frequenz.client.common.metrics.MetricConnectionCategory`
14+
15+
When loading these types from protobuf using dataclass-level converters (e.g., `delivery_area_from_proto`, `metric_sample_from_proto`), the low-level fields (`code_type`, `category`, `metric`) now store the raw integer `0` for unspecified values instead of the deprecated member. Unspecified values should be rare errors, so it is better to expose them only via the low-level interface.
16+
17+
Lower-level enum-level converters still return the deprecated member.
18+
19+
Users are encouraged to switch from direct field access to the new `get_*()` methods (see New Features), which provide a safer way to handle unspecified or unrecognized values.
1020

1121
## New Features
1222

23+
* Added new exceptions:
24+
25+
* `frequenz.client.common.ClientCommonError` as a base exception for the package.
26+
* `frequenz.client.common.UnspecifiedValueError` for unspecified values (raw `0` or the deprecated member).
27+
* `frequenz.client.common.UnrecognizedValueError` for enum members not yet recognized by the library. Carries the raw integer value in its `value` attribute.
28+
29+
* Added safe convenience getters that raise the new exceptions for unspecified or unrecognized values:
30+
31+
* `frequenz.client.common.grid.DeliveryArea.get_code_type()`
32+
* `frequenz.client.common.metrics.MetricConnection.get_category()`
33+
* `frequenz.client.common.metrics.MetricSample.get_metric()`
34+
1335
* Added a new `frequenz.client.common.types.Lifetime` type together with the `frequenz.client.common.types.proto.v1alpha8.lifetime_from_proto` conversion function.
36+
1437
* Added a new `frequenz.client.common.types.Location` type together with the `frequenz.client.common.types.proto.v1alpha8.location_from_proto` conversion function.
38+
1539
* Added a new `frequenz.client.common.microgrid.Microgrid` type, together with the `frequenz.client.common.microgrid.proto.v1alpha8.microgrid_from_proto` conversion function.
16-
* Added a new `frequenz.client.common.ClientCommonError` base exception and `UnspecifiedValueError` at the package root.
40+
1741
* Added a new `frequenz.client.common.microgrid.electrical_components` package, featuring a `ElectricalComponent` class hierarchy and its families (battery, inverter, EV charger, etc.), and `ElectricalComponentConnection`, including `v1alpha8` proto conversion functions.
1842
* Added a new `frequenz.client.common.microgrid.Microgrid` type with a raising `is_active()` method, together with the `frequenz.client.common.microgrid.proto.v1alpha8.microgrid_from_proto` conversion function.
1943

0 commit comments

Comments
 (0)