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

Fallback to jedi when using python 2.7, <=3.5 #15734

Merged
merged 3 commits into from
Mar 22, 2021

Conversation

karthiknadig
Copy link
Member

@karthiknadig karthiknadig commented Mar 19, 2021

In this PR:

  1. Split jedi and jedi-language-server installation.
  2. Upgrade jedi-language-server to latest.
  3. Use jedi < 0.18 for 2.7 and <= 3.5.

Closes #15735
Closes #15724
Closes #15731

Copy link
Member

@brettcannon brettcannon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor cleanup in dependencies, otherwise LGTM!

.github/actions/build-vsix/action.yml Outdated Show resolved Hide resolved
gulpfile.js Show resolved Hide resolved
jedils_requirements.in Outdated Show resolved Hide resolved
pythonFiles/runJediLanguageServer.py Outdated Show resolved Hide resolved
src/client/activation/activationService.ts Outdated Show resolved Hide resolved
@codecov-io
Copy link

Codecov Report

Merging #15734 (b798b28) into main (3ca66f9) will increase coverage by 0%.
The diff coverage is 16%.

@@           Coverage Diff           @@
##            main   #15734    +/-   ##
=======================================
  Coverage     64%      65%            
=======================================
  Files        557      551     -6     
  Lines      26730    26370   -360     
  Branches    3887     3806    -81     
=======================================
- Hits       17292    17257    -35     
+ Misses      8708     8382   -326     
- Partials     730      731     +1     
Impacted Files Coverage Δ
src/client/activation/activationService.ts 86% <0%> (-3%) ⬇️
...rc/client/activation/jedi/languageClientFactory.ts 46% <0%> (ø)
src/client/telemetry/index.ts 77% <ø> (ø)
src/client/telemetry/constants.ts 100% <100%> (ø)
src/client/activation/jedi.ts 19% <0%> (-2%) ⬇️
src/client/providers/jediProxy.ts 23% <0%> (ø)
src/client/common/platform/fileSystem.ts 80% <0%> (ø)
src/client/common/installer/poetryInstaller.ts 95% <0%> (ø)
...nts/discovery/locators/services/condaEnvService.ts 80% <0%> (ø)
...discovery/locators/services/condaEnvFileService.ts 85% <0%> (ø)
... and 6 more

@karthiknadig karthiknadig added the skip tests Updates to tests unnecessary label Mar 20, 2021
pythonFiles/runJediLanguageServer.py Show resolved Hide resolved
Comment on lines +236 to +241
if (serverType === LanguageServerType.JediLSP && interpreter && interpreter.version) {
if (interpreter.version.major < 3 || (interpreter.version.major === 3 && interpreter.version.minor < 6)) {
sendTelemetryEvent(EventName.JEDI_LANGUAGE_SERVER_FALLBACK);
serverType = LanguageServerType.Jedi;
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably mention this in JediLSP description in package.json.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have a description for the individual values in the LS field. May be we can change it (field type) to be better described. Although there still no consensus on how to provide enum descriptions in json.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, we can skip this for now I guess.

@karthiknadig karthiknadig merged commit 3121b91 into microsoft:main Mar 22, 2021
karthiknadig added a commit to karthiknadig/vscode-python that referenced this pull request Mar 22, 2021
* Fallback to jedi when using 2.7

* Address comments.

* Update jedi-language-server to latest again
karthiknadig added a commit that referenced this pull request Mar 23, 2021
* Fallback to jedi when using 2.7

* Address comments.

* Update jedi-language-server to latest again
@karthiknadig karthiknadig deleted the fallback-27 branch March 24, 2021 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip tests Updates to tests unnecessary
Projects
None yet
4 participants