Skip to content

Deprecate Broadcast with @deprecated instead of an alias to the private _Broadcast #586

Closed

Description

@llucax

What's needed?

On v2.x.x, #565 turned Broadcast into a deprecated_aliases() alias of the private frequenz.channels._broadcast._Broadcast. The generated docs show Broadcast = frequenz.channels._broadcast._Broadcast, and the deprecation points users at that private class instead of the real replacement, BroadcastChannel (see #565 (comment)).

Proposed solution

Following the deprecations guide:

  • Make Broadcast a public class again, a copy kept as is, decorated with @deprecated and the message frequenz.channels.Broadcast is deprecated. Use frequenz.channels.BroadcastChannel instead.
  • Add a hand-written Deprecated: notice to its docstring: Deprecated since v1.12.0. Use [`BroadcastChannel`][frequenz.channels.BroadcastChannel] instead. (Document @deprecated symbols too griffe-frequenz-core#9 will make this render without a duplicate notice once it's released).
  • The new message matches the own-deprecations filterwarnings entry added by Add frequenz-core and the deprecations tooling #576, so tests that use Broadcast on purpose need pytest.deprecated_call().

Additional context

Broadcast stays deprecated in v2.0.0 and is removed in v3.0.0 (#581), so this has to be fixed before v2.0.0 is released.

Activity

  1. added this to the v2.0.0 milestone on Nov 5, 2026
  2. added
    part:❓
    priority:❓
    type:enhancement
    part:channels
    and removed
    part:❓
    priority:❓
    on Nov 5, 2026
  3. added a commit that references this issue on Nov 13, 2026
  4. added a commit that references this issue on Nov 20, 2026
    56c9b95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    part:channelstype:enhancement

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions