jupyter_server
jupyter_server copied to clipboard
Fix notebook URL opened in browser when redirect file not used
Fix #1325.
With notebook~=7.0
ServerApp is responsible for launching browser, not NotebookApp anymore. In notebook~=6.0
, launch_browser
will append notebook path for opening in browser even when use_redirect_file
is set to false
.
ServerApp used to do the same, last time in v1.3.0. The change in behavior/bug seems to be introduced in 1bbcbcb359, released as 1.4.0.
Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
If this PR is on the right track, I can try adding some tests. Lmk.
Hi @randomir, this seems like a reasonable change to me. @afshin, since you made the original change, do you agree?
Hi @randomir, this seems like a reasonable change to me. @afshin, since you made the original change, do you agree?
This looks right to me. @randomir do you want to take a crack at writing a test? Otherwise, I can take this PR over to get it merged.
@Zsailer, thanks for taking a look. I can take a crack at writing a test, and then ping you when I think it's ready for review.
Great! thanks @randomir! Let me know if you need any help or have any questions around our unit tests.
From my perspective, it appears this is not limited to notebooks but to jupyterlab as well. It appears that the jupyter lab
command does not see or respond to c.ServerApp.use_redirect_file=False
by sending http://localhost:8889/?token=...
to the browser (instead of sending file:///...
)
With this PR, will jupyter lab
now respect c.ServerApp.use_redirect_file=False
?
If yes, when will this be merged?
If no, can you please clarify for me? Is there a different config to be able to get jupyter lab
to not use a redirect file but rather send http://localhost:8889/?token=...
?
Thank you.