Skip to content

[ENH]: allow passing a function to CallbackRegistry.disconnect #23306

Closed

Description

@ianhi

Problem

Currently to disconnect a callback in a callback registry you need to keep track of the connection id. It'd be easier to use if you could instead just pass the function to disconnect.

Proposed solution

Allow for the following:

reg = CallbackRegistry()

def f1():
   pass

cid = reg.connect("something", f1)

reg.disconnect_func("something", f1) 
# above is equivalent to reg.disconnect(cid)

Activity

  1. github-actions commented on Dec 12, 2025

    @github-actions

    This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

  2. added this to the v3.11.0 milestone on Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions