Skip to content

Drop the soft dependency on Jupyter #18073

Description

Before we can consider this we have to investigate what this would look like for users.

  • What will no longer work in the extension (e.g. data viewer)?
  • How will users be recommended to install the Jupyter extension when they would need/want it (e.g. when they open a .ipynb file)?

Activity

  1. brian-finisher commented on Nov 23, 2021

    @brian-finisher

    I'll be very excited to see the soft dependency removed! I couldn't figure out why I had Jupyter extensions being installed in my remote docker devcontainers! While not a huge deal, it makes the container configuration a bit slower, and clutters up the extension view. While it can be uninstalled manually, I don't think that's really an option to automate with the .devcontainer.json config

  2. luabud commented on Jan 22, 2022

    @luabud
    Member

    TL;DR:

    • Features that I believe will no longer be available on Python extension install:
      • IntelliSense support for Python notebooks
      • Selecting a kernel and running cells
      • Opening the data viewer when debugging
      • Opening the interactive window (through the command or from the code lenses for #%% blocks)
    • The Jupyter extension seems to be only recommended when kernel selection is triggered from a notebook (either from the "select kernel" command, or from the "run cell" commands).

    More info below.


    To investigate what would be the behavior if we no longer installed the Jupyter extension by default, I tested the scenarios below with the Python extension installed and the Jupyter extension not installed.

    Jupyter notebooks

    • Notebook gets rendered properly
    • All the "Notebook: ..." commands work properly
      • The ones that require kernel selection (e.g. "Select Kernel", "Run cells", etc.) trigger the prompt below, as expected, and users are then directed to the marketplace to install the Jupyter extension: image

    Python interactive window

    • There are no references to the interactive window from the Python extension itself. No code lenses show up either on files with cells defined by # %% :
      image

    Opening the data viewer when debugging

    • The option doesn't show up when right-clicking on a variable from the local window when Jupyter isn't installed:

    image


    After that, I looked into the source code to see if there was anything I could be missing. If I understand it correctly (and there's a good chance I don't), there seems to be only two things we use/call from the Jupyter extension:
    registerRemoteServerProvider and showDataViewer (

    export type JupyterExtensionApi = {
    ). I believe the entry points to any of those are not displayed anywhere in the Python extension, so that should be fine.

    Required changes

    If we were to proceed with this idea, there are additional changes that would need to be done on:

    • README
    • Walkthroughs
    • Build and dependencies files
    • License files

    Optional changes

    We could consider introducing more recommendations for users to install the Jupyter extension in scenarios that make sense, for example:

    • When Pylance is triggered for open notebooks
    • When right clicking on a variable in the debugger local window (where "open in data viewer" would show up)
    • From walkthroughs
  3. rchiodo commented on Jan 22, 2022

    @rchiodo
  4. luabud commented on Jan 22, 2022

    @luabud
    Member

    Thank you for confirming, Rich!

  5. rchiodo commented on Jan 22, 2022

    @rchiodo
  6. luabud commented on Jan 22, 2022

    @luabud
    Member

    Rich Chiodo (@rchiodo) is this also the case when a kernels isn't selected? I think I'm mostly looking at what are the parts of the experience that are different when the Jupyter extension isn't installed vs when it is installed but no kernel is selected.

  7. rchiodo commented on Jan 22, 2022

    @rchiodo

    Yes same thing happens with no kernel selected. Jupyter is the only extension handling intellisense for notebooks (python notebooks anyway)

  8. 27 remaining items

  9. luabud commented on Apr 7, 2023

    @luabud
    Member

    when installing the pre-release version of the Python extension, the Jupyter extension is no longer installed by default. We're planning to ship these changes on our stable version next month :)

  10. luabud commented on Apr 25, 2023

    @luabud
    Member

    To verify, uninstall the Python extension. Then install the pre-release version of the Python extension and make sure it doesn't install the Jupyter extension

  11. locked as resolved and limited conversation to collaborators on May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions