FIX : first pass at fixing nbagg close issue#4456
Conversation
|
Why do you say this is not the correct solution? |
|
The registration of the On the other hand, this code path may be only accessed through pyplot so it is ok (and this relates back to my, @OceanWolf , and @fariza long running attempt to pull pyplot related code out of the backends). |
|
|
78aa7a5 to
f08e811
Compare
|
Fixed and force pushed. |
|
@tritemio Can you see if this fixes your problem? If you need this to work for a class very soon we can work out a monkey-patch recipe. |
|
@tacaswell, thanks for fixing this. I have problems building matplotlib on windows. I tried to build a conda package from this recipe here, replacing the initial part of meta.yml with: but it fails with: Building from sources with |
|
@tacaswell, I tested your patch on linux. It solves this specific problem, i.e. that no new figure is shown after closing a figure with the "x" button. However, I have other issues with the
|
|
Those should be new issues. They are related to the issue is the single On Fri, May 22, 2015, 18:29 Antonino Ingargiola [email protected]
|
f08e811 to
c0cb5b6
Compare
|
This needs to be merged soon. |
There was a problem hiding this comment.
Just curious: why is this down here instead of inside the on_close() method?
|
I'm not 100% of the behaviour that is being targeted here. Is this fixing a bug, or changing the behaviour? If the latter, we certainly would want a UAT for this.
I'm confident we can do this by next weekend - is that too late? |
|
The problem is that when you hit the red 'x' the figure is closed on the js side, but not on the mpl side so |
|
It looks fine to me now, MEP27 will fix this anyway, but as the main change occurs only in Note I say this having never worked with |
|
This makes sense on first read and I definitely see the problem it's trying to address. But as the last "nbagg" expert I'll defer to @pelson for the final word on this one. |
|
Coupled with #4841 |
7228163 to
7888942
Compare
7888942 to
2ca678c
Compare
|
There are two remaining subtle things
and updating the UAT |
|
Great improvements. Do you want to fix the remaining issues on this branch before merging or do that in a new PR? I noticed that the connection info in I.e. with one figure open and shown it reports the figure a pending show: As far as I can tell it reports all figures as pending show in interactive mode. This is however not an issue with this branch but already happens on master. In IPython/Jupyter 4 |
|
I think both of those can be done in a different PR, but I want to update the UAT before we merge this. I don't think that the connection_info is useful in interactive mode. It is looking at |
|
👍 |
|
This seems to have a bad interaction with some styles, but not all, where On Sun, Aug 16, 2015, 9:08 AM Jens Hedegaard Nielsen <
|
|
I can't reproduce the issue I was having on this branch, but saw it on a really hacked up branch (basically merged all the outstanding feature PRs) that I have a demo at pygotham off of. |
There was a problem hiding this comment.
I assume you did this as a PEP8 change, but the second line still lacks a space of indent...
|
UAT? What does that mean? Does your (@tacaswell) comment about |
|
User acceptance testing, In the notebook modified in the last commit |
|
Looks like it now needs a rebase otherwise good |
|
This is a conflict in the UAT, hurray! |
Add callback to destroy figure when the user hits the red x in the notebook. This is not the correct solution, but it (might) work for now.
- only actually closes the figure (in the mpl sense) if all of the managers active comms are dead - closes figure when all visible copies are removed from dom - eliminates many of the [IPKernelApp] ERROR | No such comm: XXXX errors closes matplotlib#4841
In interactive mode the number of pending figures will always be equal to the number of open figures. Only include this count in `connection_info` in non-interactive mode.
f2e1443 to
f1c9d78
Compare
- update to use python3 - update to use nbformat v4 - add test for close figure on remove from DOM
FIX : first pass at fixing nbagg close issue
|
I made an issue to track the remaining figure close issues above #4940 |
|
Thanks for taking care of the that issue. On Mon, Aug 17, 2015, 12:45 PM Jens Hedegaard Nielsen <
|
Add callback to destroy figure when the user hits the red x
in the notebook.
This is not the correct solution, but it (might) work for now.
closes #4281 ?