Repository navigation
Add has_receivers/has_senders and fix BroadcastChannel auto-close #565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
shsms
merged 15 commits into
frequenz-floss:v2.x.x
from
shsms:broadcast-channel-has-receivers
Nov 5, 2026
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
da0ee39
Wake waiting broadcast receivers when they are closed
shsms 90fb133
Stop reporting closed broadcast receivers as ready
shsms 3b7e4da
Keep broadcast channels open when their receivers are gone
shsms 4a16c77
Refuse to clone closed broadcast senders
shsms 788a90c
Apply BroadcastChannel receiver options to subscribed receivers
shsms 6e73966
Add has_receivers and has_senders to broadcast endpoints
shsms 8d0b94e
Stop BroadcastChannel from emitting a deprecation warning
shsms e59cc98
Point the Broadcast docs to BroadcastChannel
shsms 3049de9
Document how BroadcastChannel closes itself
shsms 28fcb62
Correct the broadcast docs on closing
shsms c109906
Show BroadcastChannel in the user guide and README
shsms 81897bd
Use BroadcastChannel in docstring examples
shsms 93e5bff
Close a pipe's ends when it stops on its own
shsms d8f894a
Let a pipe keep sending after a failed send
shsms 42053e0
Update release notes
shsms File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
docs/user-guide/channels/anycast.md → docs/user-guide/channels/oneshot.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, this turned out not to be great, as the alias target is not public, but a private symbol, and the real replacement is not the actual target, so the generated docs will be confusing and point to the wrong thing:
I thought of adding some options to
deprecated_aliases()to fix this, but I think this is just not a good fit for it, and I think it would be better to just keep your original approach of copying the class and keep the old copy@deprecated, ideally doing the following to comply to the new upcoming deprecation guide:Broadcastwith@deprecated, emitting:frequenz.channels.Broadcast is deprecated. Use frequenz.channels.BroadcastChannel instead.Deprecated:admonition to its class docstring:Deprecated since v1.12.0. Use [BroadcastChannel][frequenz.channels.BroadcastChannel] instead.Future Griffe decorator support will preserve this notice without adding a second notice from the runtime warning. The rest of the legacy documentation remains fully rendered.
Sorry about that 😬
I don't think we need to block this PR on this though, we can also fix it in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tracked in #586, so it gets fixed before v2.0.0.