You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename "value" to "message" and other minor breaking changes (#281)
This PR replaces the term "value" with "message" as "value" is too
generic and used in many other contexts.
It also makes `Selected.was_stopped` a property and make some function
taking only one obvious argument positional-only, to avoid having the
argument name being part of the interface (we actually renamed those
arguments too, but that's not included in the release notes as they are
not part of the public API any more anyways).
We also do some other minor internal renaming and changing of arguments
to positional-or-keyword-only.
Copy file name to clipboardExpand all lines: RELEASE_NOTES.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,19 @@
44
44
45
45
- 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`).
46
46
47
+
*`Receiver`
48
+
49
+
- The `map()` function now takes a positional-only argument, if you were using `receiver.map(call=fun)` you should replace it with `receiver.map(func)`.
50
+
51
+
*`Selected`
52
+
53
+
- The `value` property was renamed to `message`.
54
+
-`was_stopped` is now a property, you need to replace `selected.was_stopped()` with `selected.was_stopped`.
55
+
56
+
*`Sender`
57
+
58
+
- The `send` method now takes a positional-only argument, if you were using `sender.send(msg=message)` you should replace it with `sender.send(message)`.
59
+
47
60
*`Timer` and support classes
48
61
49
62
- Moved from `frequenz.channels.util` to `frequenz.channels.timer`.
@@ -79,9 +92,9 @@
79
92
80
93
*`Peekable`
81
94
82
-
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.
95
+
This class was removed because it was merely a shortcut to a receiver that caches the last message received. It did not fit the channel abstraction well and was infrequently used.
83
96
84
-
You can replace it with a task that receives and retains the last value.
97
+
You can replace it with a task that receives and retains the last message.
0 commit comments