Update backend_nbagg for removal of Gcf._activeQue.#15901
Update backend_nbagg for removal of Gcf._activeQue.#15901anntzer merged 1 commit intomatplotlib:masterfrom
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. |
timhoffm
left a comment
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?
|
done |
timhoffm
left a comment
There was a problem hiding this comment.
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