-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Update backend_nbagg for removal of Gcf._activeQue. #15901
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
Conversation
What is |
Before #13581 there was both Gcf.figs and Gcf._activeQue. figs was a mapping of manager numbers to manager instances, and _activeQue a list of managers such that the active manager was the one at the end. I thought that they were always updated together and thus could just combine them together (making figs an OrderedDict), but I missed the fact that nbagg is the sole place which removes something from activeQue (making it nonactivable) without removing it from figs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment in line 262ff should be updated. There is no activeQue anymore.
Looks like nbagg was (ab)using _activeQue to have "pyplot-managed figures that can never be gcf()" (not really sure why? this was here ever since nbagg was first merged in). Now that _activeQue has been merged into figs this is no longer possible, but I *guess* the patch is the closest in semantics?
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anybody can merge after CI pass.
…901-on-v3.2.x Backport PR #15901 on branch v3.2.x (Update backend_nbagg for removal of Gcf._activeQue.)
Looks like nbagg was (ab)using _activeQue to have "pyplot-managed
figures that can never be gcf()" (not really sure why? this was here
ever since nbagg was first merged in #3008). Now that _activeQue has been
merged into figs this is no longer possible, but I guess the patch is
the closest in semantics?
Sorry I missed that in #13581. If that's too much of a problem we can revert #13581, but intentionally making Gcf.figs and Gcf._activeQue go out of sync is... a bit too clever?
PR Summary
PR Checklist