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
The `Receiver.ready()` method (and related `receive()` and `__anext__`
when used as an async iterator) now `raise`s a `ReceiverError` and in
particular a `ReceiverStoppedError` when the receiver has no more
messages to receive.
`Receiver.consume()` doesn't raise any exceptions now (except for
`AssertionError` if there are programming errors).
Receivers raising `EOFError` now raise `ReceiverError` instead.
For channels which receivers stop receiving when the channel is closed,
the `ReceiverStoppedError` is chained with a `__cause__` that is a
`ChannelClosedError` with the channel that was closed.
Since now there is no need to use `ChannelClosedError` without
specifying a channel, now it requires the argument `channel` (before it
was optional).
Signed-off-by: Leandro Lucarella <[email protected]>
Copy file name to clipboardExpand all lines: RELEASE_NOTES.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,16 @@
8
8
9
9
* The `Sender.send()` method now `raise`s a `SenderError` instead of returning `False`. The `SenderError` will typically have a `ChannelClosedError` and the underlying reason as a chained exception.
10
10
11
+
* The `Receiver.ready()` method (and related `receive()` and `__anext__` when used as an async iterator) now `raise`s a `ReceiverError` and in particular a `ReceiverStoppedError` when the receiver has no more messages to receive.
12
+
13
+
`Receiver.consume()` doesn't raise any exceptions.
14
+
15
+
Receivers raising `EOFError` now raise `ReceiverError` instead.
16
+
17
+
* For channels which senders raise an error when the channel is closed or which receivers stop receiving when the channel is closed, the `SenderError` and `ReceiverStoppedError` are chained with a `__cause__` that is a `ChannelClosedError` with the channel that was closed.
18
+
19
+
*`ChannelClosedError` now requires the argument `channel` (before it was optional).
20
+
11
21
## New Features
12
22
13
23
* New exceptions were added:
@@ -16,6 +26,10 @@
16
26
17
27
*`SendError`: Raised for errors when sending messages.
18
28
29
+
*`ReceiverError`: Raised for errors when receiving messages.
30
+
31
+
*`ReceiverClosedError`: Raised when a receiver don't have more messages to receive.
32
+
19
33
## Bug Fixes
20
34
21
35
<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
0 commit comments