-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Conversation
renderer, self, dsu, self.suppressComposite) | ||
try: | ||
renderer.open_group('figure') | ||
# prevent triggering call backs during the draw process |
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.
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.
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.
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.
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.
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)
Addresses jupyter/notebook#1881 where exceptions during the draw can cause an infinite loop.
02c1167
to
4928219
Compare
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) |
Add doc note. I could be convinced that everything should behave this way (not just the figure). |
b98257f
to
7a7480d
Compare
The docs failure looks like a python3 only thing that slipped through in the mandlebrot example. |
@tacaswell this looks fine to me. Is it ready to merge? |
Yes. This gets around a nasty bug of the infinite loop variety, |
merged v2.x to master |
Addresses jupyter/notebook#1881 where
exceptions during the draw can cause an infinite loop.