Skip to content
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

For Jupyter, q() should probably be overridden to error and tell you how to actually shut down the right way #554

Open
DavisVaughan opened this issue Sep 30, 2024 · 1 comment

Comments

@DavisVaughan
Copy link
Contributor

DavisVaughan commented Sep 30, 2024

Screenshot 2024-09-30 at 4 46 58 PM

Otherwise R just dies and Jupyter throws warnings that R isn't responding to is_complete_request and friends


We could probably send the ask_exit payload from the kernel -> frontend, telling the frontend to request a shutdown?
https://jupyter-client.readthedocs.io/en/stable/messaging.html#payloads-deprecated

Payloads are deprecated but there is currently no alternative, so I feel like we should just use it for now (its been deprecated for over 9 years...)

It looks like you send it as part of an execute_reply
https://github.com/jupyter/jupyter_console/blob/fddbc42d2e0be85feace1fe783a05e2b569fceae/jupyter_console/ptshell.py#L743-L767

@DavisVaughan
Copy link
Contributor Author

Oh ask_exit is also how ipython implements the exit and quit commands! i.e. when you type that directly at the console it:

So yea I doubt there is any way this would get removed and is probably safe to use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants