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
- Properly await for service task
- Make output more verbose for darglint
- Add base exception
- Make `send()` raise a `SenderError`
- Make receivers raise `ReceiverError`
- Move exceptions into its own module
- Add a `ReceiverInvalidatedError`
- Don't raise exceptions in Receiver.ready()
Fixes#52.
Copy file name to clipboardExpand all lines: RELEASE_NOTES.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,33 @@
6
6
7
7
## Upgrading
8
8
9
-
<!-- Here goes notes on how to upgrade from previous versions, including if there are any depractions and what they should be replaced with -->
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
+
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 `ReceiverInvalidatedError` 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
+
21
+
* Now exceptions are not raised in Receiver.ready() but in Receiver.consume() (receive() or the async iterator `anext`).
10
22
11
23
## New Features
12
24
13
-
<!-- Here goes the main new features and examples or instructions on how to use them -->
25
+
* New exceptions were added:
26
+
27
+
*`Error`: A base exception from which all exceptions from this library inherit.
28
+
29
+
*`SendError`: Raised for errors when sending messages.
30
+
31
+
*`ReceiverError`: Raised for errors when receiving messages.
32
+
33
+
*`ReceiverClosedError`: Raised when a receiver don't have more messages to receive.
34
+
35
+
*`ReceiverInvalidatedError`: Raised when a receiver was invalidated (for example it was converted into a `Peekable`).
0 commit comments