| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
I think this could be really useful for debugging interactive stuff, so tentatively 👍
Sorry, something went wrong.
There was a problem hiding this comment.
minor nits, but liking the new docs :)
Sorry, something went wrong.
|
What do you think about naming this blocked()? I like to use context manager names that are not imperative verbs and cannot be confused with simple functions. There is no general convention on this in the community, but I think with callbacks.blocked() reads quite nicely. |
Sorry, something went wrong.
|
@timhoffm, apparently there is a preferred convention and your suggestion lines up with that :) |
Sorry, something went wrong.
|
So is maybe annoying, but I think this needs a short API changes note too. only incompatible changes need API change notes. Also, and I might be confused about the functionality here, but would it be possible for the what's new example to be slight less toy/use like one of the auto registrated callbacks or something? |
Sorry, something went wrong.
CallbackRegistry objects now have a context manager .block() method that can be used to temporarily block callback signals from being processed.
|
I came up with another toy-like example, but with interactivity on the figure canvas and disabling key-press events. Did you have another example/area in mind to apply this? It looks like the widgets keep their callbacks private in _observers, so I guess this doesn't really help the end user currently over there. |
Sorry, something went wrong.
|
Using fig.canvas.callbacks is perfect - I was unsure whether the functionality extended to the fig callbacks and this clears it right up & I think would be a common use case 😄 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
CallbackRegistry objects gain a context manager .block() method that can be used to temporarily block callback signals from being processed.
Closes #20802
Would help with disabling norm update signals in #19553
PR Checklist