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

feat(jupyter): support confirm and prompt in notebooks #23592

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Commits on Apr 30, 2024

  1. deno-jupyter: support confirm and prompt in notebooks

    Supports `confirm` and `prompt` with custom versions used when inside a
    Jupyter Notebook with Deno kernel.
    
    The desired behavior (per python reference and docs):
    * confirm or prompt will trigger kernel to request the frontend to get
      user's input and return it to backend for processing
    
    We accomplish this by creating custom versions of confirm and prompt
    that call into an op_jupyter_input rust function with access to the
    stdin_socket.
    
    `confirm` and `prompt` are instantiated in the jupyter specific TS
    interface, so they only override the standard functions in jupyter
    context.
    
    Jupyter requires us to clone zmq_identities for this "input_request"
    message as documented in comments:
    
    ```
    * Using with_identities() because of jupyter client docs instruction
    * Requires cloning identities per :
    * https://jupyter-client.readthedocs.io/en/latest/messaging.html#messages-on-the-stdin-router-dealer-channel
    * The stdin socket of the client is required to have the
    *  same zmq IDENTITY as the client’s shell socket.
    *  Because of this, the input_request must be sent with the same IDENTITY
    *  routing prefix as the execute_reply in order for the frontend to receive the message.
    ```
    zph committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    27ef078 View commit details
    Browse the repository at this point in the history
  2. Formatting

    zph committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    f9a7a3e View commit details
    Browse the repository at this point in the history
  3. JSDoc

    zph committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    49c60d7 View commit details
    Browse the repository at this point in the history
  4. [ci] bump

    zph committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    2162e33 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    eb7ed61 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f4faf22 View commit details
    Browse the repository at this point in the history