|
11 | 11 |
|
12 | 12 | You should instantiate using `Anycast(name=..., limit=...)` (or `Anycast(name=...)` if the default `limit` is enough) instead of `Anycast(...)` or `Anycast(maxsize=...)`. |
13 | 13 |
|
14 | | -* `Bidirectional` |
15 | | - |
16 | | - - The `client_id` and `service_id` arguments were merged into a keyword-only `name`. |
| 14 | + - `new_sender` and `new_receiver`: They now return a base `Sender` and `Receiver` class (respectively) instead of a channel-specific `Sender` or `Receiver` subclass. |
17 | 15 |
|
18 | | - You should instantiate using `Bidirectional(name=...)` instead of `Bidirectional(..., ...)` or `Bidirectional(client_id=..., service_id=...)`. |
| 16 | + This means users now don't have access to the internals to the channel-specific `Sender` and `Receiver` subclasses. |
19 | 17 |
|
20 | 18 | * `Broadcast` |
21 | 19 |
|
|
27 | 25 |
|
28 | 26 | You should use `.new_receiver(name=name, limit=limit)` (or `.new_receiver()` if the defaults are enough) instead of `.new_receiver(name)` or `.new_receiver(name, maxsize)`. |
29 | 27 |
|
| 28 | + - `new_sender` and `new_receiver` now return a base `Sender` and `Receiver` class (respectively) instead of a channel-specific `Sender` or `Receiver` subclass. |
| 29 | + |
| 30 | + This means users now don't have access to the internals to the channel-specific `Sender` and `Receiver` subclasses. |
| 31 | + |
30 | 32 | * `Event` |
31 | 33 |
|
32 | 34 | - `__init__`: The `name` argument was made keyword-only. The default was changed to a more readable version of `id(self)`. |
33 | 35 |
|
34 | 36 | You should instantiate using `Event(name=...)` instead of `Event(...)`. |
35 | 37 |
|
| 38 | + - Moved from `frequenz.channels.util` to `frequenz.channels.event`. |
| 39 | + |
| 40 | +* `FileWatcher` |
| 41 | + |
| 42 | + - Moved from `frequenz.channels.util` to `frequenz.channels.file_watcher`. |
| 43 | + |
| 44 | + - Support classes are no longer nested inside `FileWatcher`. They are now top-level classes within the new `frequenz.channels.file_watcher` module (e.g., `frequenz.channels.util.FileWatcher.EventType` -> `frequenz.channels.file_watcher.EventType`, `frequenz.channels.util.FileWatcher.Event` -> `frequenz.channels.file_watcher.Event`). |
| 45 | + |
| 46 | +* `Timer` and support classes |
| 47 | + |
| 48 | + - Moved from `frequenz.channels.util` to `frequenz.channels.timer`. |
| 49 | + |
36 | 50 | * All exceptions that took `Any` as the `message` argument now take `str` instead. |
37 | 51 |
|
38 | 52 | If you were passing a non-`str` value to an exception, you should convert it using `str(value)` before passing it to the exception. |
39 | 53 |
|
| 54 | +* The following symbols were moved to the top-level `frequenz.channels` package: |
| 55 | + |
| 56 | + - `Merge` |
| 57 | + - `MergeNamed` |
| 58 | + - `Selected` |
| 59 | + - `SelectError` |
| 60 | + - `SelectErrorGroup` |
| 61 | + - `UnhandledSelectedError` |
| 62 | + - `select` |
| 63 | + - `selected_from` |
| 64 | + |
| 65 | +### Removals |
| 66 | + |
| 67 | +* `Bidirectional` |
| 68 | + |
| 69 | + This channel was removed as it is not recommended practice and was a niche use case. If you need to use it, you can set up two channels or copy the `Bidirectional` class from the previous version to your project. |
| 70 | + |
| 71 | +* `Peekable` |
| 72 | + |
| 73 | + This class was removed because it was merely a shortcut to a receiver that caches the last value received. It did not fit the channel abstraction well and was infrequently used. |
| 74 | + |
| 75 | + You can replace it with a task that receives and retains the last value. |
| 76 | + |
| 77 | +* `Broadcast.new_peekable()` |
| 78 | + |
| 79 | + This was removed alongside `Peekable`. |
| 80 | + |
| 81 | +* `Receiver.into_peekable()` |
| 82 | + |
| 83 | + This was removed alongside `Peekable`. |
| 84 | + |
| 85 | +* `ReceiverInvalidatedError` |
| 86 | + |
| 87 | + This was removed alongside `Peekable` (it was only raised when using a `Receiver` that was converted into a `Peekable`). |
| 88 | + |
| 89 | +* `util` |
| 90 | + |
| 91 | + The entire `util` package was removed and its symbols were either moved to the top-level package or to their own public modules (as noted above). |
| 92 | + |
40 | 93 | ## New Features |
41 | 94 |
|
42 | 95 | * `Anycast` |
|
0 commit comments