From 77f8cb0d5a365a62b30dd6200b1a133e7f8f5929 Mon Sep 17 00:00:00 2001 From: Brendon Smith Date: Sat, 7 Oct 2023 18:29:54 -0400 Subject: [PATCH] Pin VSCode Python extension to avoid breaking Jedi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The VSCode Python extension works with either the proprietary Microsoft extension Pylance or the open-source Jedi language server. Microsoft expectedly provides less support for Jedi than for Pylance, leading to occasional issues. 02033b8 1c68b3f microsoft/vscode-python#15858 The latest extension release, ms-python.python@2023.18.0 (2023-10-05), appears not to install Jedi at all. Updating from 2023.16.0 to 2023.18.0 with the setting `"python.languageServer": "Jedi"` results in a crash with `ModuleNotFoundError: No module named 'jedi_language_server'`. This error appears with ms-python.python@2023.18.0 on VSCodium 1.83.0 but not ms-python.python@2023.18.0 on VSCode 1.83.0. As the error is not occuring in Microsoft's official VSCode builds, they may not address it. It may be a problem specific to the extension on Open VSX, the extension marketplace VSCodium uses. It appears that the extension is not installing the Jedi language server at all in VSCodium. The entire `jedilsp` directory is missing. ```sh # VSCodium extension files ~ ❯ ls -la ~/.vscode-oss/extensions/ms-python.python-2023.18.0-universal/pythonFiles/lib/ total 0 drwxr-xr-x 3 brendon staff 96 Oct 7 16:58 . drwxr-xr-x 29 brendon staff 928 Oct 7 16:58 .. drwxr-xr-x 15 brendon staff 480 Oct 7 16:58 python # VSCode extension files ~ ❯ ls -la ~/.vscode/extensions/ms-python.python-2023.18.0/pythonFiles/lib/ total 0 drwxr-xr-x@ 4 brendon staff 128 Oct 7 17:11 . drwxr-xr-x@ 29 brendon staff 928 Oct 7 17:11 .. drwxr-xr-x@ 32 brendon staff 1024 Oct 7 17:12 jedilsp drwxr-xr-x@ 15 brendon staff 480 Oct 7 17:11 python ``` Reverting to 2023.16.0 fixes the issue. ```sh ~ ❯ ls -la ~/.vscode-oss/extensions/ms-python.python-2023.16.0-universal/pythonFiles/lib total 0 drwxr-xr-x@ 4 brendon staff 128 Oct 7 17:54 . drwxr-xr-x@ 29 brendon staff 928 Oct 7 17:54 .. drwxr-xr-x@ 35 brendon staff 1120 Oct 7 17:54 jedilsp drwxr-xr-x@ 15 brendon staff 480 Oct 7 17:54 python ``` https://github.com/microsoft/vscode-python/discussions/19807#discussioncomment-7219781 https://open-vsx.org/extension/ms-python/python --- vscode/extensions/marketplace-open-vsx.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/extensions/marketplace-open-vsx.txt b/vscode/extensions/marketplace-open-vsx.txt index 7e975bb..9a8e555 100644 --- a/vscode/extensions/marketplace-open-vsx.txt +++ b/vscode/extensions/marketplace-open-vsx.txt @@ -12,7 +12,7 @@ ms-python.black-formatter ms-python.flake8 ms-python.isort ms-python.mypy-type-checker -ms-python.python +ms-python.python@2023.16.0 redhat.vscode-yaml streetsidesoftware.code-spell-checker tamasfe.even-better-toml