Skip to content

Commit 05e0241

Browse files
authored
Remove MPLS support from the extension (microsoft#17835)
* Remove MPLS support from the extension * Remove MPLS settings and migrate some settings * Fix for tests * Remove more settings * Address review comments. * Cleanup .eslintignore * Move updating settings to diagnostics * Implement no-op for python._loadLanguageServerExtension * Add tests for switch to LS diagnostic
1 parent c4b510a commit 05e0241

100 files changed

Lines changed: 404 additions & 6173 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,10 @@ src/test/unittests.ts
2525
src/test/vscode-mock.ts
2626

2727
src/test/interpreters/mocks.ts
28-
src/test/interpreters/interpreterVersion.unit.test.ts
29-
src/test/interpreters/virtualEnvs/index.unit.test.ts
3028
src/test/interpreters/virtualEnvs/condaInheritEnvPrompt.unit.test.ts
31-
src/test/interpreters/virtualEnvManager.unit.test.ts
3229
src/test/interpreters/pythonPathUpdaterFactory.unit.test.ts
3330
src/test/interpreters/activation/service.unit.test.ts
3431
src/test/interpreters/helpers.unit.test.ts
35-
src/test/interpreters/currentPathService.unit.test.ts
3632
src/test/interpreters/display.unit.test.ts
3733

3834
src/test/terminals/codeExecution/terminalCodeExec.unit.test.ts
@@ -46,16 +42,6 @@ src/test/providers/codeActionProvider/main.unit.test.ts
4642
src/test/providers/shebangCodeLenseProvider.unit.test.ts
4743

4844
src/test/activation/activationService.unit.test.ts
49-
src/test/activation/languageServer/downloadChannelRules.unit.test.ts
50-
src/test/activation/languageServer/languageServer.unit.test.ts
51-
src/test/activation/languageServer/languageServerFolderService.unit.test.ts
52-
src/test/activation/languageServer/languageServerPackageRepository.unit.test.ts
53-
src/test/activation/languageServer/manager.unit.test.ts
54-
src/test/activation/languageServer/analysisOptions.unit.test.ts
55-
src/test/activation/languageServer/languageServerExtension.unit.test.ts
56-
src/test/activation/languageServer/languageClientFactory.unit.test.ts
57-
src/test/activation/languageServer/outputChannel.unit.test.ts
58-
src/test/activation/languageServer/languageServerPackageService.unit.test.ts
5945
src/test/activation/activeResource.unit.test.ts
6046
src/test/activation/node/languageServerChangeHandler.unit.test.ts
6147
src/test/activation/node/activator.unit.test.ts
@@ -77,7 +63,6 @@ src/test/testing/common/debugLauncher.unit.test.ts
7763
src/test/testing/common/services/configSettingService.unit.test.ts
7864

7965
src/test/common/exitCIAfterTestReporter.ts
80-
src/test/common/crypto.unit.test.ts
8166
src/test/common/net/fileDownloader.unit.test.ts
8267
src/test/common/net/httpClient.unit.test.ts
8368
src/test/common/terminals/activator/index.unit.test.ts
@@ -106,7 +91,6 @@ src/test/common/configSettings/configSettings.unit.test.ts
10691
src/test/common/serviceRegistry.unit.test.ts
10792
src/test/common/extensions.unit.test.ts
10893
src/test/common/variables/envVarsService.unit.test.ts
109-
src/test/common/nuget/azureBobStoreRepository.unit.test.ts
11094
src/test/common/helpers.test.ts
11195
src/test/common/application/commands/reloadCommand.unit.test.ts
11296
src/test/common/installer/channelManager.unit.test.ts
@@ -121,12 +105,10 @@ src/test/common/process/processFactory.unit.test.ts
121105
src/test/common/process/pythonToolService.unit.test.ts
122106
src/test/common/process/proc.observable.test.ts
123107
src/test/common/process/pythonProc.simple.multiroot.test.ts
124-
src/test/common/process/execFactory.test.ts
125108
src/test/common/process/logger.unit.test.ts
126109
src/test/common/process/proc.exec.test.ts
127110
src/test/common/process/pythonProcess.unit.test.ts
128111
src/test/common/process/proc.unit.test.ts
129-
src/test/common/asyncDump.ts
130112
src/test/common/interpreterPathService.unit.test.ts
131113
src/test/common/insidersBuild/insidersExtensionPrompt.unit.test.ts
132114
src/test/common/insidersBuild/downloadChannelService.unit.test.ts
@@ -163,13 +145,10 @@ src/test/telemetry/envFileTelemetry.unit.test.ts
163145

164146
src/test/linters/pylint.unit.test.ts
165147
src/test/linters/lint.unit.test.ts
166-
src/test/linters/linter.availability.unit.test.ts
167148
src/test/linters/common.ts
168149
src/test/linters/lintengine.test.ts
169150
src/test/linters/lint.multilinter.test.ts
170151
src/test/linters/lint.test.ts
171-
src/test/linters/linterinfo.unit.test.ts
172-
src/test/linters/lint.manager.unit.test.ts
173152
src/test/linters/linterCommands.unit.test.ts
174153
src/test/linters/linterManager.unit.test.ts
175154

@@ -182,7 +161,6 @@ src/test/application/diagnostics/checks/updateTestSettings.unit.test.ts
182161
src/test/application/diagnostics/checks/powerShellActivation.unit.test.ts
183162
src/test/application/diagnostics/checks/invalidPythonPathInDebugger.unit.test.ts
184163
src/test/application/diagnostics/checks/envPathVariable.unit.test.ts
185-
src/test/application/diagnostics/checks/lsNotSupported.unit.test.ts
186164
src/test/application/diagnostics/applicationDiagnostics.unit.test.ts
187165
src/test/application/diagnostics/promptHandler.unit.test.ts
188166
src/test/application/diagnostics/sourceMapSupportService.unit.test.ts
@@ -200,8 +178,6 @@ src/client/interpreter/configuration/services/workspaceUpdaterService.ts
200178
src/client/interpreter/configuration/services/workspaceFolderUpdaterService.ts
201179
src/client/interpreter/helpers.ts
202180
src/client/interpreter/virtualEnvs/condaInheritEnvPrompt.ts
203-
src/client/interpreter/virtualEnvs/types.ts
204-
src/client/interpreter/virtualEnvs/index.ts
205181
src/client/interpreter/activation/service.ts
206182
src/client/interpreter/display/shebangCodeLensProvider.ts
207183
src/client/interpreter/display/index.ts
@@ -216,7 +192,6 @@ src/client/terminals/codeExecution/codeExecutionManager.ts
216192
src/client/terminals/codeExecution/djangoContext.ts
217193

218194
src/client/providers/serviceRegistry.ts
219-
src/client/providers/completionSource.ts
220195
src/client/providers/formatProvider.ts
221196
src/client/providers/importSortProvider.ts
222197
src/client/providers/replProvider.ts
@@ -226,28 +201,12 @@ src/client/providers/codeActionProvider/pythonCodeActionProvider.ts
226201
src/client/providers/linterProvider.ts
227202
src/client/providers/terminalProvider.ts
228203

229-
src/client/activation/languageServer/manager.ts
230-
src/client/activation/languageServer/languageServerExtension.ts
231-
src/client/activation/languageServer/languageServerProxy.ts
232-
src/client/activation/languageServer/languageClientFactory.ts
233-
src/client/activation/languageServer/platformData.ts
234-
src/client/activation/languageServer/languageServerCompatibilityService.ts
235-
src/client/activation/languageServer/languageServerPackageRepository.ts
236-
src/client/activation/languageServer/languageServerFolderService.ts
237-
src/client/activation/languageServer/outputChannel.ts
238-
src/client/activation/languageServer/languageServerPackageService.ts
239-
src/client/activation/languageServer/analysisOptions.ts
240-
src/client/activation/languageServer/activator.ts
241204
src/client/activation/commands.ts
242205
src/client/activation/progress.ts
243206
src/client/activation/extensionSurvey.ts
244207
src/client/activation/common/languageServerChangeHandler.ts
245208
src/client/activation/common/activatorBase.ts
246-
src/client/activation/common/languageServerFolderService.ts
247-
src/client/activation/common/languageServerPackageService.ts
248-
src/client/activation/common/packageRepository.ts
249209
src/client/activation/common/analysisOptions.ts
250-
src/client/activation/common/downloadChannelRules.ts
251210
src/client/activation/refCountedLanguageServer.ts
252211
src/client/activation/languageClientMiddleware.ts
253212
src/client/activation/node/manager.ts
@@ -328,21 +287,11 @@ src/client/common/utils/misc.ts
328287
src/client/common/utils/cacheUtils.ts
329288
src/client/common/utils/workerPool.ts
330289
src/client/common/extensions.ts
331-
src/client/common/dotnet/compatibilityService.ts
332-
src/client/common/dotnet/serviceRegistry.ts
333-
src/client/common/dotnet/services/unknownOsCompatibilityService.ts
334-
src/client/common/dotnet/services/macCompatibilityService.ts
335-
src/client/common/dotnet/services/linuxCompatibilityService.ts
336-
src/client/common/dotnet/services/windowsCompatibilityService.ts
337290
src/client/common/logger.ts
338291
src/client/common/variables/serviceRegistry.ts
339292
src/client/common/variables/environment.ts
340293
src/client/common/variables/types.ts
341294
src/client/common/variables/systemVariables.ts
342-
src/client/common/nuget/azureBlobStoreNugetRepository.ts
343-
src/client/common/nuget/nugetRepository.ts
344-
src/client/common/nuget/types.ts
345-
src/client/common/nuget/nugetService.ts
346295
src/client/common/cancellation.ts
347296
src/client/common/interpreterPathService.ts
348297
src/client/common/application/applicationShell.ts
@@ -419,7 +368,6 @@ src/client/debugger/extension/helpers/protocolParser.ts
419368

420369
src/client/linters/pydocstyle.ts
421370
src/client/linters/serviceRegistry.ts
422-
src/client/linters/linterAvailability.ts
423371
src/client/linters/lintingEngine.ts
424372
src/client/linters/prospector.ts
425373
src/client/linters/linterInfo.ts
@@ -444,4 +392,3 @@ src/client/application/diagnostics/commands/ignore.ts
444392
src/client/application/diagnostics/commands/factory.ts
445393
src/client/application/diagnostics/commands/execVSCCommand.ts
446394
src/client/application/diagnostics/commands/launchBrowser.ts
447-

.vscode/settings.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"**/node_modules": true,
1212
".vscode-test": false,
1313
".vscode test": false,
14-
"**/.mypy_cache/**": true,
14+
"**/.mypy_cache/**": true
1515
},
1616
"search.exclude": {
1717
"out": true, // set this to false to include "out" folder in search results
@@ -54,8 +54,6 @@
5454
"source.fixAll.eslint": true
5555
},
5656
"python.languageServer": "Pylance",
57-
"python.analysis.logLevel": "Trace",
58-
"python.analysis.downloadChannel": "beta",
5957
"python.linting.pylintEnabled": false,
6058
"python.linting.flake8Enabled": true,
6159
"cucumberautocomplete.skipDocStringsFormat": true,

news/3 Code Health/17834.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove Microsoft Python Language Server support from the extension.

package.json

Lines changed: 0 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,6 @@
286286
}
287287
],
288288
"commands": [
289-
{
290-
"category": "Python",
291-
"command": "python.analysis.clearCache",
292-
"title": "%python.command.python.analysis.clearCache.title%"
293-
},
294289
{
295290
"category": "Python",
296291
"command": "python.analysis.restartLanguageServer",
@@ -460,119 +455,12 @@
460455
],
461456
"configuration": {
462457
"properties": {
463-
"python.analysis.cacheFolderPath": {
464-
"description": "Path to a writable folder where analyzer can cache its data. Change requires restart.",
465-
"scope": "resource",
466-
"type": "string"
467-
},
468-
"python.analysis.diagnosticPublishDelay": {
469-
"default": 1000,
470-
"description": "Delay before diagnostic messages are transferred to the problems list (in milliseconds).",
471-
"scope": "resource",
472-
"type": "integer"
473-
},
474-
"python.analysis.disabled": {
475-
"default": [],
476-
"description": "List of suppressed diagnostic messages.",
477-
"items": {
478-
"type": "string"
479-
},
480-
"scope": "resource",
481-
"type": "array"
482-
},
483-
"python.analysis.errors": {
484-
"default": [],
485-
"description": "List of diagnostics messages to be shown as errors.",
486-
"items": {
487-
"type": "string"
488-
},
489-
"scope": "resource",
490-
"type": "array"
491-
},
492-
"python.analysis.information": {
493-
"default": [],
494-
"description": "List of diagnostics messages to be shown as information.",
495-
"items": {
496-
"type": "string"
497-
},
498-
"scope": "resource",
499-
"type": "array"
500-
},
501-
"python.analysis.logLevel": {
502-
"default": "Error",
503-
"description": "Defines type of log messages language server writes into the output window.",
504-
"enum": [
505-
"Error",
506-
"Information",
507-
"Trace",
508-
"Warning"
509-
],
510-
"scope": "resource",
511-
"type": "string"
512-
},
513-
"python.analysis.memory.keepLibraryAst": {
514-
"default": false,
515-
"description": "Allows code analysis to keep parser trees in memory. Increases memory consumption but may improve performance with large library analysis.",
516-
"scope": "resource",
517-
"type": "boolean"
518-
},
519-
"python.analysis.symbolsHierarchyDepthLimit": {
520-
"default": 10,
521-
"description": "Limits depth of the symbol tree in the document outline.",
522-
"scope": "resource",
523-
"type": "integer"
524-
},
525-
"python.analysis.typeshedPaths": {
526-
"default": [],
527-
"description": "Paths to Typeshed stub folders. Default is Typeshed installed with the language server. Change requires restart.",
528-
"items": {
529-
"type": "string"
530-
},
531-
"scope": "resource",
532-
"type": "array"
533-
},
534-
"python.analysis.warnings": {
535-
"default": [],
536-
"description": "List of diagnostics messages to be shown as warnings.",
537-
"items": {
538-
"type": "string"
539-
},
540-
"scope": "resource",
541-
"type": "array"
542-
},
543-
"python.autoComplete.addBrackets": {
544-
"default": false,
545-
"description": "Automatically add brackets for functions.",
546-
"scope": "resource",
547-
"type": "boolean"
548-
},
549458
"python.autoComplete.extraPaths": {
550459
"default": [],
551460
"description": "List of paths to libraries and the like that need to be imported by auto complete engine. E.g. when using Google App SDK, the paths are not in system path, hence need to be added into this list.",
552461
"scope": "resource",
553462
"type": "array"
554463
},
555-
"python.autoComplete.showAdvancedMembers": {
556-
"default": true,
557-
"description": "Controls appearance of methods with double underscores in the completion list.",
558-
"scope": "resource",
559-
"type": "boolean"
560-
},
561-
"python.autoComplete.typeshedPaths": {
562-
"default": [],
563-
"description": "Specifies paths to local typeshed repository clone(s) for the Python language server.",
564-
"items": {
565-
"type": "string"
566-
},
567-
"scope": "resource",
568-
"type": "array"
569-
},
570-
"python.autoUpdateLanguageServer": {
571-
"default": true,
572-
"description": "Automatically update the language server.",
573-
"scope": "application",
574-
"type": "boolean"
575-
},
576464
"python.condaPath": {
577465
"default": "",
578466
"description": "Path to the conda executable to use for activation (version 4.4+).",
@@ -1705,12 +1593,6 @@
17051593
],
17061594
"menus": {
17071595
"commandPalette": [
1708-
{
1709-
"category": "Python",
1710-
"command": "python.analysis.clearCache",
1711-
"title": "%python.command.python.analysis.clearCache.title%",
1712-
"when": "!virtualWorkspace && shellExecutionSupported"
1713-
},
17141596
{
17151597
"category": "Python",
17161598
"command": "python.analysis.restartLanguageServer",

package.nls.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"python.command.python.runLinting.title": "Run Linting",
2727
"python.command.python.enableSourceMapSupport.title": "Enable Source Map Support For Extension Debugging",
2828
"python.command.python.clearPersistentStorage.title": "Clear Internal Extension Cache",
29-
"python.command.python.analysis.clearCache.title": "Clear Module Analysis Cache",
3029
"python.command.python.analysis.restartLanguageServer.title": "Restart Language Server",
3130
"python.command.python.launchTensorBoard.title": "Launch TensorBoard",
3231
"python.command.python.refreshTensorBoard.title": "Refresh TensorBoard",
@@ -166,7 +165,7 @@
166165
"Testing.configureTests": "Configure Test Framework",
167166
"Testing.testNotConfigured": "No test framework configured.",
168167
"Common.openOutputPanel": "Show output",
169-
"LanguageService.statusItem.name":"Python IntelliSense Status",
168+
"LanguageService.statusItem.name": "Python IntelliSense Status",
170169
"LanguageService.statusItem.text": "Partial Mode",
171170
"LanguageService.statusItem.detail": "Limited IntelliSense provided by Pylance",
172171
"LanguageService.lsFailedToStart": "We encountered an issue starting the language server. Reverting to Jedi language engine. Check the Python output panel for details.",
@@ -177,7 +176,6 @@
177176
"LanguageService.extractionCompletedOutputMessage": "Language server download complete",
178177
"LanguageService.extractionDoneOutputMessage": "done",
179178
"LanguageService.reloadVSCodeIfSeachPathHasChanged": "Search paths have changed for this Python interpreter. Please reload the extension to ensure that the IntelliSense works correctly",
180-
"LanguageService.startingMicrosoft": "Starting Microsoft Python language server.",
181179
"LanguageService.startingPylance": "Starting Pylance language server.",
182180
"LanguageService.startingJedi": "Starting Jedi language server.",
183181
"LanguageService.startingNone": "Editor support is inactive since language server is set to None.",
@@ -220,7 +218,5 @@
220218
"TensorBoard.launchNativeTensorBoardSessionCodeLens": "▶ Launch TensorBoard Session",
221219
"TensorBoard.enterRemoteUrl": "Enter remote URL",
222220
"TensorBoard.enterRemoteUrlDetail": "Enter a URL pointing to a remote directory containing your TensorBoard log files",
223-
"MPLSDeprecation.bannerMessage": "The Microsoft Python Language Server is reaching end of life at the beginning of November. If you do not select a new language server, you will have your setting automatically updated at deprecation. Read more about this in our [September release blog post](https://aka.ms/pvsc-september-2021). Please switch your language server to a supported value:",
224-
"MPLSDeprecation.switchToPylance": "Switch to Pylance (recommended)",
225-
"MPLSDeprecation.switchToJedi": "Switch to Jedi (open source)"
221+
"SwitchToDefaultLS.bannerMessage": "The Microsoft Python Language Server has reached end of life. Your language server has been set to the default for Python in VS Code, Pylance. If you’d like to change your language server, you can learn about how to do so [here](https://devblogs.microsoft.com/python/python-in-visual-studio-code-may-2021-release/#configuring-your-language-server). Read Pylance’s license [here](https://marketplace.visualstudio.com/items/ms-python.vscode-pylance/license)."
226222
}

package.nls.zh-cn.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"python.command.python.runLinting.title": "执行代码检查",
2525
"python.command.python.enableSourceMapSupport.title": "为扩展调试启用 Source Map 支持",
2626
"python.command.python.clearPersistentStorage.title": "清空扩展内部缓存",
27-
"python.command.python.analysis.clearCache.title": "清除模块分析缓存",
2827
"python.command.python.analysis.restartLanguageServer.title": "重启语言服务器",
2928
"python.command.python.launchTensorBoard.title": "启动 TensorBoard",
3029
"python.command.python.refreshTensorBoard.title": "刷新 TensorBoard",
@@ -169,7 +168,6 @@
169168
"LanguageService.extractionCompletedOutputMessage": "语言服务器下载完成",
170169
"LanguageService.extractionDoneOutputMessage": "完成",
171170
"LanguageService.reloadVSCodeIfSeachPathHasChanged": "该 Python 解释器的搜索路径已改变,请重新加载扩展以确保 IntelliSense 正常工作。",
172-
"LanguageService.startingMicrosoft": "正在启动 Microsoft Python 语言服务器。",
173171
"LanguageService.startingPylance": "正在启动 Pylance 语言服务器。",
174172
"LanguageService.startingJedi": "正在启动 Jedi Python 语言服务器。",
175173
"LanguageService.startingNone": "由于语言服务器设置为空,编辑器支持处于非活动状态。",

0 commit comments

Comments
 (0)