{{ message }}
Update backend_nbagg for removal of Gcf._activeQue. - #15901
Merged
Merged
Conversation
tacaswell
approved these changes
Dec 10, 2019
Member
Contributor
Author
|
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. |
timhoffm
reviewed
Dec 16, 2019
timhoffm
left a comment
Member
There was a problem hiding this comment.
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?
Contributor
Author
timhoffm
approved these changes
Dec 16, 2019
timhoffm
left a comment
Member
There was a problem hiding this comment.
Anybody can merge after CI pass.
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Dec 17, 2019
timhoffm
added a commit
that referenced
this pull request
Dec 17, 2019
…901-on-v3.2.x Backport PR #15901 on branch v3.2.x (Update backend_nbagg for removal of Gcf._activeQue.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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