Skip to content
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

API/FIX: mark figure as not stale on draw attempt #7451

Merged
merged 2 commits into from Nov 24, 2016

Conversation

tacaswell
Copy link
Member

Addresses jupyter/notebook#1881 where
exceptions during the draw can cause an infinite loop.

@tacaswell tacaswell added this to the 2.0 (style change major release) milestone Nov 13, 2016
renderer, self, dsu, self.suppressComposite)
try:
renderer.open_group('figure')
# prevent triggering call backs during the draw process
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't this comment refer to the self._stale = True line that was removed? I guess it possibly does nothing since it shouldn't have that underscore, but the comment should go too, if it's not going to be left in.

Copy link
Member Author

Choose a reason for hiding this comment

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

no, the self._stale should not have been removed. The reason it reaches in and uses the private variable is to not re-trigger the drawing logic.

Copy link
Member Author

Choose a reason for hiding this comment

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

actually, on a bit further consideration that line does not matter. In the first pass at the stale system which did not propagate 'stale' state past an already stale state, however during the development (to support live updates in a plain python prompt) we made the 'staleness' always propogate all the way up (which may be related to performance issues in #6664) so that you could put a call back on the stale transition to draw idle (in IPython we use their 'post-execute' hook to kick the drawing)

@tacaswell tacaswell modified the milestones: 2.0.1 (next bug fix release), 2.0 (style change major release) Nov 16, 2016
Addresses jupyter/notebook#1881 where
exceptions during the draw can cause an infinite loop.
@tacaswell
Copy link
Member Author

pulled out of line comment so it does not get folded:

In the first pass at the stale system which did not propagate 'stale' state past an already stale state, however during the development (to support live updates in a plain python prompt) we made the 'staleness' always propogate all the way up (which may be related to performance issues in #6664) so that you could put a call back on the stale transition to draw idle (in IPython we use their 'post-execute' hook to kick the drawing)

@tacaswell tacaswell modified the milestones: 2.0 (style change major release), 2.0.1 (next bug fix release) Nov 16, 2016
@tacaswell
Copy link
Member Author

Add doc note. I could be convinced that everything should behave this way (not just the figure).

@tacaswell
Copy link
Member Author

The docs failure looks like a python3 only thing that slipped through in the mandlebrot example.

@efiring
Copy link
Member

efiring commented Nov 23, 2016

@tacaswell this looks fine to me. Is it ready to merge?

@tacaswell
Copy link
Member Author

Yes. This gets around a nasty bug of the infinite loop variety,

@efiring efiring merged commit 08eccfb into matplotlib:v2.x Nov 24, 2016
@efiring
Copy link
Member

efiring commented Nov 24, 2016

merged v2.x to master

@tacaswell tacaswell deleted the fix_infinite_redraw_loop branch November 24, 2016 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants