microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.3k stars 294 forks source link

Duplicated completion items #16173

Open heejaechang opened 3 weeks ago

heejaechang commented 3 weeks ago

Applies To

What happened?

Image

repro steps

  1. create a cell
  2. type import os
  3. run the cell
  4. create a cell after the first cell
  5. type os. <= completion here

repro for both notebook and interactive window

VS Code Version

1.94.2

Jupyter Extension Version

v2024.10.2024100401

Jupyter logs

No response

Coding Language and Runtime Version

No response

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

None

DonJayamanne commented 3 weeks ago

@heejaechang I do not see any duplicates in the screenshot Do i need Pylance or Jedi or neither?

GF-Huang commented 6 days ago

@rchiodo Is it fixed in v2024.11.2?

rchiodo commented 3 days ago

The fix for this wouldn't be in Pylance. It would be in the jupyter extension. Given that Don submitted a fix 3 weeks ago, I suspect the latest Jupyter prerelease has the fix in it.

GF-Huang commented 3 days ago

I tried the Jupyter v2024.11.2024102401 (pre-release), issue still.

rchiodo commented 2 days ago

I'm using 2024.11.2024111901 and it doesn't seem to repro for me:

Image

GF-Huang commented 2 days ago

@rchiodo I found it depends on Python version, I can reproduce on 3.10.12, could you try it?

And, I can't find 2024.11.2024111901, how did you do that?

Image

rchiodo commented 2 days ago

You might be on VS code stable. I'm using VS code insiders. Jupyter may have updated their required VS code version so the latest only works on insiders.

I can repro with Python 3.10 too:

Image

@DonJayamanne you may need something different based on the results returned from ipykernel. Older versions must have had different completions.