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

Skip to content

Fix RecursionError when closing nbAgg figures. #17025

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 1 commit into from
Apr 4, 2020

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Apr 4, 2020

PR Summary

Previously, if a figure number was not in the list of managed figures, the destroy would be skipped, but now that only happens if a figure number is passed. If a figure manager is passed, then the destroy happens regardless. In nbAgg, this loops around closing/close_event and eventually calls destroy again, leading to a RecursionError.

This broke in 9e6f112; cc @anntzer.

PR Checklist

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

Previously, if a figure number was not in the list of managed figures,
the destroy would be skipped, but now that only happens if a figure
number is passed. If a figure manager is passed, then the destroy
happens regardless. In nbAgg, this loops around closing/close_event and
eventually calls destroy again, leading to a RecursionError.
@QuLogic QuLogic added this to the v3.3.0 milestone Apr 4, 2020
Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

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

oops, lgtm.

@tacaswell tacaswell merged commit 25a80b6 into matplotlib:master Apr 4, 2020
@QuLogic QuLogic deleted the fix-nbagg-close branch April 4, 2020 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants