Skip to content

Commit 5ca54b2

Browse files
authored
Clear release notes (#190)
2 parents 96e40b2 + afe340b commit 5ca54b2

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

‎RELEASE_NOTES.md‎

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
11
# Frequenz Core Library Release Notes
22

3-
## Upgrading
4-
5-
- [`Interval`][frequenz.core.math.Interval]'s type parameter no longer includes `None`. The exported type variable `LessThanComparableOrNoneT` (bound to `LessThanComparable | None`) was deprecated and replaced with `LessThanComparableT` (bound to `LessThanComparable`). `None` is still accepted as a value for `start` / `end` to indicate an unbounded side, but it is treated purely as bound metadata rather than a value in the interval's comparable space.
3+
## Summary
64

7-
Migration:
5+
<!-- Here goes a general summary of what this release is about -->
86

9-
- `Interval[int | None]` → `Interval[int]`
10-
- `Interval[LessThanComparable | None]` → `Interval[LessThanComparable]`
11-
- `LessThanComparableOrNoneT` (importable name) → `LessThanComparableT`
7+
## Upgrading
128

13-
Note that explicitly using `Interval[int | None]` still works, as `(int | None) | None` is equivalent to `int | None`, even when it is no longer needed nor recommended. Old code will mostly work, but there is one soft breaking change: `None in some_interval` and `None in some_interval_set` is now a type-check error at call sites, matching the design intent that `None` is a bound marker and never a member value.
9+
<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
1410

1511
## New Features
1612

17-
- Added [`FloatInt`][frequenz.core.typing.FloatInt], a type alias for `float | int`.
18-
19-
[PEP 484](https://peps.python.org/pep-0484/)'s [numeric tower](https://peps.python.org/pep-0484/#the-numeric-tower) makes `int` assignable wherever `float` is annotated, while at runtime `isinstance(1, float)` is `False`. A plain `float` annotation therefore silently admits values that break `match … case float():` arms and `float`-only methods like `hex()`.
13+
<!-- Here goes the main new features and examples or instructions on how to use them -->
2014

21-
Annotate with `FloatInt` instead of a plain `float`: the alias docstring documents the trap in detail, including the inherent `bool ⊂ int` leak.
15+
## Bug Fixes
2216

23-
- [`is_close_to_zero()`][frequenz.core.math.is_close_to_zero] now annotates its `value` and `abs_tol` parameters as [`FloatInt`][frequenz.core.typing.FloatInt]. This is a pure widening, `int` arguments were always accepted by type checkers, the annotation just didn't admit it.
17+
<!-- Here goes notable bug fixes that are worth a special mention or explanation -->

0 commit comments

Comments
 (0)