Open ianhi opened 3 years ago
Thanks for flagging me @ianhi -- it's worth tagging @jasongrout here too, if not Min or Sylvain or others. ipython_blocking
is a pretty fragile library since it is hacking get_ipython.kernel.shell_handlers
, and it's hard to imagine what that will effect in non-vanilla Jupyter deployments. When it works, great. When it doesn't, you fall into a deep rabbit hole pretty quickly. I still don't know what's going on with ipyfilechooser
in your linked issue although I wouldn't say that the ipyfilechooser
issue is a huge issue, as I don't see that widget used in an overwhelming number of Notebooks.
I'm happy to help write examples of ipython_blocking
besides the provided README if you'd like. In our corporate environment, it did not gain widespread traction as the go-to library for blocking. Rather, Notebook developers continued to write callback functions or refactored very large UI-component Notebooks into traditional web applications.
More background reading for anyone coming to this issue -
ipython_blocking
, similarly fragile / unusedipython_blocking
cc @jeffyjefflabs @lheagy @somedave
what's going on with ipyfilechooser in your linked issue although I wouldn't say that the ipyfilechooser issue is a huge issue, as I don't see that widget used in an overwhelming number of Notebooks.
In https://github.com/crahan/ipyfilechooser/issues/36#issuecomment-774315857 you said "it looks like the memory leak is happening with pretty much any widget. " so I was worried that this is not contained to ipyfilechooser
channels aimed at debugger, could this pattern separate widget comms from cell execution comms?
This was mentioned in an ipywidgets meeting at some point. But I don't think it was ever followed up on. It seems unlikely to happen (I think?) as it's a big change (I think?).
Yep fair point @ianhi . I suppose I would say that "blocking widgets" is an unsolved problem then. Putting application logic in callback functions has its drawbacks. ipython_blocking
has numerous limitations. There's no lack of community desire for the feature though.
https://github.com/kafonek/ipython_blocking seems to be the only way to wait for a user interaction on the frontend. Which is one of the most common requests on the jupyter-widgets gitter channel so it should at least be mentioned somewhere in this repo and perhaps even have an example where a widget demonstrates wrapping it in a function.
attn: @kafonek does this make sense or is https://github.com/kafonek/ipython_blocking/issues/7 intractable enough that ipython_blocking shouldn't be recommended?