Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/client/activation/activationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,10 @@ export class LanguageServerExtensionActivationService
}
}

// If "Pylance" was explicitly chosen, use it even though it's not guaranteed to work
// properly with Python 2.
if (!this.getCurrentLanguageServerTypeIsDefault()) {
// If Pylance was chosen via the default and the interpreter is Python 2, fall back to
// Jedi. If Pylance was explicitly chosen, continue anyway, even if Pylance won't work
// as expected, matching pre-default behavior.
if (this.getCurrentLanguageServerTypeIsDefault()) {
if (serverType === LanguageServerType.Node && interpreter && interpreter.version) {
if (interpreter.version.major < 3) {
sendTelemetryEvent(EventName.JEDI_FALLBACK);
Expand Down