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

Choosing a kernel for the first time does not cause a kernel change event #16112

Open
1 of 2 tasks
imadjarov-quantinuum opened this issue Oct 8, 2024 · 2 comments · May be fixed by microsoft/vscode-python#24358
Open
1 of 2 tasks
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster notebook-intellisense Intellisense & other language features in notebook cells for any language

Comments

@imadjarov-quantinuum
Copy link

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

This is related to the recently closed #15967 (@rchiodo @DonJayamanne)

When choosing a kernel for a notebook that has had no previous kernel selected, a "kernel change event" (as discussed in the issue above) is not fired. For example, Pylance (v2024.10.1) does not start highlighting syntax with the newly selected kernel. Only once another kernel is selected again does this event fire and Pylance starts highlighting code. It seems like the above bugfix only works once you select a kernel more than once.

I am running this via SSH Remote btw.

VS Code Version

1.94.0

Jupyter Extension Version

2024.9.1

Jupyter logs

No response

Coding Language and Runtime Version

Python

Language Extension Version (if applicable)

2024.16.0

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Remote

@imadjarov-quantinuum imadjarov-quantinuum added the bug Issue identified by VS Code Team member as probable bug label Oct 8, 2024
@DonJayamanne
Copy link
Contributor

@rchiodo I'm struggling to understand this issue here. If no kernel was ever selected, then selecting a kernel will definitely cause a change event as there was no information to start with.

@imadjarov-quantinuum Please can you install the latest pre-release versions of Jupyter and Pylance and confirm this works.

@DonJayamanne DonJayamanne added info-needed Issue requires more information from poster notebook-intellisense Intellisense & other language features in notebook cells for any language labels Oct 28, 2024
@rchiodo
Copy link
Contributor

rchiodo commented Oct 28, 2024

@DonJayamanne I haven't seen this myself. Does jupyter log the get kernel request? Pylance does not, it just makes the call when getting the python path for a file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster notebook-intellisense Intellisense & other language features in notebook cells for any language
Projects
None yet
3 participants