Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Make Figure._axobservers a CallbackRegistry. #16191

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
merged 2 commits into from
Mar 9, 2020

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jan 12, 2020

This avoids having to reset it on pickling/unpickling, as
CallbackRegistry already handles that itself. Also if we later make
CallbackRegistry support pickling/unpickling some callbacks (which I
plan to do), axobservers will also benefit from that.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzer
Copy link
Contributor Author

anntzer commented Jan 13, 2020

Added a second commit also removing "show" from the list of popped-out attributes: we stopped monkeypatching figure.show on the figure instance in 51ffd4b.

Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modulo a proposal for more consistent naming.

@anntzer anntzer force-pushed the axobscr branch 2 times, most recently from 999ac71 to 9fef863 Compare January 13, 2020 22:59
This avoids having to reset it on pickling/unpickling, as
CallbackRegistry already handles that itself.  Also if we later make
CallbackRegistry support pickling/unpickling some callbacks (which I
plan to do), axobservers will also benefit from that.
We stopped monkeypatching figure.show on the figure instance in 51ffd4b.
@QuLogic QuLogic merged commit f6e94f8 into matplotlib:master Mar 9, 2020
@QuLogic QuLogic added this to the v3.3.0 milestone Mar 9, 2020
@anntzer anntzer deleted the axobscr branch March 9, 2020 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants