-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Comments
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 |
Yes, notebook intellisense won't work anymore. It requires the jupyter extension.
Without the jupyter extension, notebooks would basically have no intellisense at all.
Sent from Outlook<http://aka.ms/weboutlook>
…________________________________
From: Luciana Abud ***@***.***>
Sent: Friday, January 21, 2022 5:28 PM
To: microsoft/vscode-python ***@***.***>
Cc: Rich Chiodo ***@***.***>; Mention ***@***.***>
Subject: Re: [microsoft/vscode-python] Drop the soft dependency on Jupyter (Issue microsoft/vscode-python#18073)
TL;DR:
* Features that I believe will no longer be available on Python extension install:
* IntelliSense Improvements introduced by microsoft/vscode-jupyter#8140<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.luolix.top%2Fmicrosoft%2Fvscode-jupyter%2Fpull%2F8140&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260628838%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=otZ8qpH%2FpLs%2BMI12mVbX4Em29DAII7VY8vfeicXxMD0%3D&reserved=0> (e.g. stable semantic highlighting), but I could be wrong. @rchiodo<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.luolix.top%2Frchiodo&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260628838%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=uTJPvnGVxGTCtjmJilnEbANvgyfP1apDSMYfOwTU9q4%3D&reserved=0> -- do you happen to know if those improvements would be available when reading notebooks, in a hypothetical scenario where the Python extension no longer automatically installs the Jupyter one?
* 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] <https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F45497113%2F150616766-5d7860cd-ebbf-4bf5-82d9-8627be5956a2.png&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260678830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=uwuBzQshh51yGW2%2FHPJ6fqsu240hUTrbqHkQ%2FIDfVyc%3D&reserved=0>
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]<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F45497113%2F150617203-3b9ec5e9-12c2-4f55-ba53-0ba328d57d42.png&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260678830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Me7B32XeBgUCCe2MizM2HPlXrypzZjgkg4i2zS51fJk%3D&reserved=0>
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]<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F45497113%2F150617423-aae6233d-6409-47d8-a565-6baa67109125.png&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260678830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=TVmVQsAp%2FoBD%2BuRY9m3vHOomB%2BYReJASUH3ThBl2VhM%3D&reserved=0>
________________________________
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 (https://github.com/microsoft/vscode-python/blob/3698950c97982f31bb9dbfc19c4cd8308acda284/src/client/jupyter/jupyterIntegration.ts#L115<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.luolix.top%2Fmicrosoft%2Fvscode-python%2Fblob%2F3698950c97982f31bb9dbfc19c4cd8308acda284%2Fsrc%2Fclient%2Fjupyter%2FjupyterIntegration.ts%23L115&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260678830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Sdb1SLlag8tNBzwhNe7PXBFj1CZSl5OIPY2J809QB9g%3D&reserved=0>). 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
—
Reply to this email directly, view it on GitHub<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.luolix.top%2Fmicrosoft%2Fvscode-python%2Fissues%2F18073%23issuecomment-1019006647&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260678830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=a8TvFwsptFBS7nr%2B1sYEuem4zKFl3D9c7uimtnJ%2FWac%3D&reserved=0>, or unsubscribe<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.luolix.top%2Fnotifications%2Funsubscribe-auth%2FAEWC462L2SLSOQP3IEWUTL3UXIB4VANCNFSM5IUIPCVA&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260678830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=9luoOuhQOS5h1bmTyNw%2BGs5Nzk9BC3Vv%2Flnhv4Sj2S8%3D&reserved=0>.
Triage notifications on the go with GitHub Mobile for iOS<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260678830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=RoTWgjQnsNX3E9g8uBlAtUdvm0P91%2FqlEZMzGBQK0uk%3D&reserved=0> or Android<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260678830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Ejqc3DMF1YcXMh5AidaYZzDhYUkah4qYgvfYmuIti6U%3D&reserved=0>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thank you for confirming, Rich! |
Notebooks also render partially. We provide a bunch of renderers for things like plotly, errors, vegas, altair. Any notebook opening these would show noth
Sent from Outlook<http://aka.ms/weboutlook>
…________________________________
From: Rich Chiodo ***@***.***>
Sent: Friday, January 21, 2022 5:33 PM
To: microsoft/vscode-python ***@***.***>; microsoft/vscode-python ***@***.***>
Cc: Mention ***@***.***>
Subject: Re: [microsoft/vscode-python] Drop the soft dependency on Jupyter (Issue microsoft/vscode-python#18073)
Yes, notebook intellisense won't work anymore. It requires the jupyter extension.
Without the jupyter extension, notebooks would basically have no intellisense at all.
Sent from Outlook<http://aka.ms/weboutlook>
________________________________
From: Luciana Abud ***@***.***>
Sent: Friday, January 21, 2022 5:28 PM
To: microsoft/vscode-python ***@***.***>
Cc: Rich Chiodo ***@***.***>; Mention ***@***.***>
Subject: Re: [microsoft/vscode-python] Drop the soft dependency on Jupyter (Issue microsoft/vscode-python#18073)
TL;DR:
* Features that I believe will no longer be available on Python extension install:
* IntelliSense Improvements introduced by microsoft/vscode-jupyter#8140<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.luolix.top%2Fmicrosoft%2Fvscode-jupyter%2Fpull%2F8140&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260628838%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=otZ8qpH%2FpLs%2BMI12mVbX4Em29DAII7VY8vfeicXxMD0%3D&reserved=0> (e.g. stable semantic highlighting), but I could be wrong. @rchiodo<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.luolix.top%2Frchiodo&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260628838%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=uTJPvnGVxGTCtjmJilnEbANvgyfP1apDSMYfOwTU9q4%3D&reserved=0> -- do you happen to know if those improvements would be available when reading notebooks, in a hypothetical scenario where the Python extension no longer automatically installs the Jupyter one?
* 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] <https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F45497113%2F150616766-5d7860cd-ebbf-4bf5-82d9-8627be5956a2.png&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260678830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=uwuBzQshh51yGW2%2FHPJ6fqsu240hUTrbqHkQ%2FIDfVyc%3D&reserved=0>
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]<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F45497113%2F150617203-3b9ec5e9-12c2-4f55-ba53-0ba328d57d42.png&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260678830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Me7B32XeBgUCCe2MizM2HPlXrypzZjgkg4i2zS51fJk%3D&reserved=0>
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]<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F45497113%2F150617423-aae6233d-6409-47d8-a565-6baa67109125.png&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260678830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=TVmVQsAp%2FoBD%2BuRY9m3vHOomB%2BYReJASUH3ThBl2VhM%3D&reserved=0>
________________________________
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 (https://github.com/microsoft/vscode-python/blob/3698950c97982f31bb9dbfc19c4cd8308acda284/src/client/jupyter/jupyterIntegration.ts#L115<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.luolix.top%2Fmicrosoft%2Fvscode-python%2Fblob%2F3698950c97982f31bb9dbfc19c4cd8308acda284%2Fsrc%2Fclient%2Fjupyter%2FjupyterIntegration.ts%23L115&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260678830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Sdb1SLlag8tNBzwhNe7PXBFj1CZSl5OIPY2J809QB9g%3D&reserved=0>). 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
—
Reply to this email directly, view it on GitHub<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.luolix.top%2Fmicrosoft%2Fvscode-python%2Fissues%2F18073%23issuecomment-1019006647&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260678830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=a8TvFwsptFBS7nr%2B1sYEuem4zKFl3D9c7uimtnJ%2FWac%3D&reserved=0>, or unsubscribe<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.luolix.top%2Fnotifications%2Funsubscribe-auth%2FAEWC462L2SLSOQP3IEWUTL3UXIB4VANCNFSM5IUIPCVA&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260678830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=9luoOuhQOS5h1bmTyNw%2BGs5Nzk9BC3Vv%2Flnhv4Sj2S8%3D&reserved=0>.
Triage notifications on the go with GitHub Mobile for iOS<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260678830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=RoTWgjQnsNX3E9g8uBlAtUdvm0P91%2FqlEZMzGBQK0uk%3D&reserved=0> or Android<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Crchiodo%40microsoft.com%7Ca6ad57430b164f6d158008d9dd4686cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637784117260678830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Ejqc3DMF1YcXMh5AidaYZzDhYUkah4qYgvfYmuIti6U%3D&reserved=0>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@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. |
Yes same thing happens with no kernel selected. Jupyter is the only extension handling intellisense for notebooks (python notebooks anyway) |
@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. |
thank you! |
For #18073 --------- Co-authored-by: Brett Cannon <brett@python.org>
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 :) |
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 |
Before we can consider this we have to investigate what this would look like for users.
.ipynb
file)?The text was updated successfully, but these errors were encountered: