Skip to content

[ENH]: Should pickling a CallbackRegistry with unpicklable callbacks emit a warning? #28602

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

Open
anntzer opened this issue Jul 22, 2024 · 2 comments
Labels
New feature topic: pickle Issues to do with pickling

Comments

@anntzer
Copy link
Contributor

anntzer commented Jul 22, 2024

Problem

Currently, pickling a CallbackRegistry silently drops registered callbacks, except those register using the internal _connect_picklable (which we are careful to call only with picklable callbacks).

Proposed solution

No response

@anntzer anntzer added New feature topic: pickle Issues to do with pickling labels Jul 22, 2024
@timhoffm
Copy link
Member

We should not silently drop. I don't oversee what exposing _connect_picklable would imply. Warn is the safe minimal improvement we can make. When users are aware of the dropped callback, they can file a feature request if they want a bette solution.

@tacaswell
Copy link
Member

I agree, we should start with warning and see what feature requests we get.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New feature topic: pickle Issues to do with pickling
Projects
None yet
Development

No branches or pull requests

3 participants