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

Drop the soft dependency on Jupyter #18073

Closed
brettcannon opened this issue Nov 23, 2021 · 12 comments
Closed

Drop the soft dependency on Jupyter #18073

brettcannon opened this issue Nov 23, 2021 · 12 comments
Assignees
Labels
area-data science feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@brettcannon
Copy link
Member

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)?
@brettcannon brettcannon added feature-request Request for new features or functionality needs spike Label for issues that need investigation before they can be worked on. area-data science labels Nov 23, 2021
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Nov 23, 2021
@brian-finisher
Copy link

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

@kimadeline kimadeline removed the triage-needed Needs assignment to the proper sub-team label Nov 25, 2021
@luabud
Copy link
Member

luabud commented Jan 22, 2022

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

@rchiodo
Copy link

rchiodo commented Jan 22, 2022 via email

@luabud
Copy link
Member

luabud commented Jan 22, 2022

Thank you for confirming, Rich!

@rchiodo
Copy link

rchiodo commented Jan 22, 2022 via email

@luabud
Copy link
Member

luabud commented Jan 22, 2022

@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.

@rchiodo
Copy link

rchiodo commented Jan 22, 2022

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

@luabud
Copy link
Member

luabud commented Jan 25, 2022

@rchiodo just to make sure I understand it correctly, there will be no IntelliSense at all if the Jupyter extension isn't installed?

@rchiodo
Copy link

rchiodo commented Jan 25, 2022

@rchiodo just to make sure I understand it correctly, there will be no IntelliSense at all if the Jupyter extension isn't installed?

That is correct. Notebooks will not have any 'python' intellisense.

@luabud
Copy link
Member

luabud commented Jan 25, 2022

thank you!

@luabud luabud added needs decision and removed needs spike Label for issues that need investigation before they can be worked on. labels Jan 25, 2022
@brettcannon brettcannon added needs proposal Need to make some design decisions and removed needs decision labels Feb 3, 2022
@brettcannon brettcannon modified the milestones: March 2022, April 2022 Mar 21, 2022
@karthiknadig karthiknadig added this to the October 2022 milestone Sep 29, 2022
@luabud luabud modified the milestones: March 2023, April 2023 Mar 23, 2023
luabud added a commit that referenced this issue Mar 29, 2023
@luabud
Copy link
Member

luabud commented Apr 7, 2023

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 :)

@luabud
Copy link
Member

luabud commented Apr 25, 2023

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

@DonJayamanne DonJayamanne added the verified Verification succeeded label Apr 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-data science feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

8 participants