Open
Description
- Open a workspace folder
- Add a
.venv
- Enable verbose logging for Jupyter ext
- Open Jupyter notebook
- Open kernel picker
- Watch the logs
Notice how the .venv
is deleted and then added,
This happens everytime we invoke the refresh API in python extension.
This used to work.
I have noticed this happening again in the past 3 months or so. Not exactly sure when.
In the past we had a work around to see if the .venv
file/dir exists locally and if so, then ignore these redundant remove
API events or if an add
event is triggered after a few seconds.
This causes a few issues in Jupyter as the kernels are destroyed (if user code is already running and the like).
16:57:15.355 [trace] Python API env change detected, remove => '/Users/~/demo/.venv/bin/python'
16:57:15.355 [debug] Start refreshing Kernel Picker (1743573435355)
16:57:15.356 [debug] Python Env hidden via filter: ~/miniconda3/envs/conda1/bin/python
16:57:15.357 [debug] Python Env hidden via filter: ~/miniconda3/envs/conda1/bin/python
16:57:15.358 [debug] Python Env hidden via filter: ~/miniconda3/envs/conda1/bin/python
16:57:15.358 [debug] Python Env hidden via filter: ~/miniconda3/envs/conda1/bin/python
16:57:15.359 [trace] Python API env change detected, add => '/Users/~/demo/.venv/bin/python'
16:57:15.359 [debug] Python Env hidden via filter: ~/miniconda3/envs/conda1/bin/python
16:57:15.366 [debug] End refreshing Kernel Picker (1743573435355)
16:57:15.367 [debug] Python Env hidden via filter: ~/miniconda3/envs/conda1/bin/python
16:57:15.368 [debug] Python Env hidden via filter: ~/miniconda3/envs/conda1/bin/python
16:57:15.369 [debug] Python Env hidden via filter: ~/miniconda3/envs/conda1/bin/python
16:57:15.370 [trace] Python API env change detected, update => '/Users/~/demo/.venv/bin/python'