- Notifications
You must be signed in to change notification settings - Fork5.5k
added--autoreload flag toNotebookApp#4795
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
blink1073 left a comment
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.
Nice, thanks!
meeseeksmachine commentedSep 23, 2019
This pull request has been mentioned onJupyter Community Forum. There might be relevant details there: https://discourse.jupyter.org/t/reload-jupyter-serverextension/2200/3 |
blink1073 commentedMay 22, 2020
@telamonian, do you mind rebasing this one? |
telamonian commentedMay 22, 2020
Can do |
When passed, the webapp will watch for any changes to its Python source. Onchange, all changed packages will be reimported and the webapp will restart.Also works on Python source files in Jupyter server extensions. Implementedusing the built in `autoreload` parameter in the constructor of`tornado.web.Application`.
telamonian commentedMay 22, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@blink1073 done! |
blink1073 commentedMay 23, 2020
Thanks! |
Uh oh!
There was an error while loading.Please reload this page.
When the
--autoreloadflag is passed, the webapp will watch for any changes to its Python source. On change, all changed packages will be reimported and the webapp will restart. Also works on Python source files in Jupyter server extensions. Implemented using the built inautoreloadparameter in the constructor oftornado.web.Application, whichNotebookApp.web_appis a subclass of.While I was working on aserver extension for Jupyterlab, I got pretty sick of having to kill and restart Jupyterlab every time I made changes to the Python source. This PR is an attempt to enable hot reloading for the sources of
notebookand any extensions.Though the autoreload behavior is currently a bit cumbersome (the Notebook server will reload completely from scratch, including (on Jupyterlab, at least) launching a new browser window with a new security token), I believe that it is useful as is. I also think that in the future it can definitely be improved, most obviously by recycling certain resources on reload, such as browser windows and security tokens.