Skip to content

Commit db01d9d

Browse files
authored
Removed old telemetry and old way of searching for jupyter (#11198)
* Removed old telemetry and old code * News * Oops * Remove redundant tests * Fix failing test
1 parent a049747 commit db01d9d

15 files changed

+81
-1355
lines changed

news/3 Code Health/10809.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove deprecated telemetry and old way of searching for `Jupyter`.

src/client/datascience/constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ export enum Telemetry {
216216
OpenPlotViewer = 'DATASCIENCE.OPEN_PLOT_VIEWER',
217217
DebugCurrentCell = 'DATASCIENCE.DEBUG_CURRENT_CELL',
218218
CodeLensAverageAcquisitionTime = 'DS_INTERNAL.CODE_LENS_ACQ_TIME',
219-
ClassConstructionTime = 'DS_INTERNAL.CLASS_CONSTRUCTION_TIME',
220219
FindJupyterCommand = 'DS_INTERNAL.FIND_JUPYTER_COMMAND',
221220
/**
222221
* Telemetry sent when user selects an interpreter to be used for starting of Jupyter server.

src/client/datascience/jupyter/interpreter/jupyterCommandFinder.ts

Lines changed: 0 additions & 714 deletions
This file was deleted.

src/client/datascience/jupyter/interpreter/jupyterCommandInterpreterDependencyService.ts

Lines changed: 0 additions & 72 deletions
This file was deleted.

src/client/datascience/jupyter/interpreter/jupyterCommandInterpreterExecutionService.ts

Lines changed: 0 additions & 198 deletions
This file was deleted.

src/client/datascience/serviceRegistry.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT License.
33
'use strict';
44
import { IExtensionSingleActivationService } from '../activation/types';
5-
import { IApplicationEnvironment, IWorkspaceService } from '../common/application/types';
5+
import { IApplicationEnvironment } from '../common/application/types';
66
import { UseCustomEditorApi } from '../common/constants';
77
import { IServiceManager } from '../ioc/types';
88
import { Activation } from './activation';
@@ -48,9 +48,6 @@ import { IPyWidgetMessageDispatcherFactory } from './ipywidgets/ipyWidgetMessage
4848
import { IPyWidgetScriptSource } from './ipywidgets/ipyWidgetScriptSource';
4949
import { JupyterCommandLineSelector } from './jupyter/commandLineSelector';
5050
import { JupyterCommandFactory } from './jupyter/interpreter/jupyterCommand';
51-
import { JupyterCommandFinder } from './jupyter/interpreter/jupyterCommandFinder';
52-
import { JupyterCommandInterpreterDependencyService } from './jupyter/interpreter/jupyterCommandInterpreterDependencyService';
53-
import { JupyterCommandFinderInterpreterExecutionService } from './jupyter/interpreter/jupyterCommandInterpreterExecutionService';
5451
import { JupyterInterpreterDependencyService } from './jupyter/interpreter/jupyterInterpreterDependencyService';
5552
import { JupyterInterpreterOldCacheStateStore } from './jupyter/interpreter/jupyterInterpreterOldCacheStateStore';
5653
import { JupyterInterpreterSelectionCommand } from './jupyter/interpreter/jupyterInterpreterSelectionCommand';
@@ -189,7 +186,6 @@ export function registerTypes(serviceManager: IServiceManager) {
189186
serviceManager.addSingleton<IPlotViewerProvider>(IPlotViewerProvider, PlotViewerProvider);
190187
serviceManager.addSingleton<IStatusProvider>(IStatusProvider, StatusProvider);
191188
serviceManager.addSingleton<IThemeFinder>(IThemeFinder, ThemeFinder);
192-
serviceManager.addSingleton<JupyterCommandFinder>(JupyterCommandFinder, JupyterCommandFinder);
193189
serviceManager.addSingleton<JupyterCommandLineSelector>(JupyterCommandLineSelector, JupyterCommandLineSelector);
194190
serviceManager.addSingleton<JupyterCommandLineSelectorCommand>(JupyterCommandLineSelectorCommand, JupyterCommandLineSelectorCommand);
195191
serviceManager.addSingleton<JupyterInterpreterDependencyService>(JupyterInterpreterDependencyService, JupyterInterpreterDependencyService);
@@ -211,16 +207,8 @@ export function registerTypes(serviceManager: IServiceManager) {
211207
serviceManager.addSingleton<IJupyterServerProvider>(IJupyterServerProvider, NotebookServerProvider);
212208
serviceManager.add<IJMPConnection>(IJMPConnection, EnchannelJMPConnection);
213209
serviceManager.addSingleton<IPyWidgetMessageDispatcherFactory>(IPyWidgetMessageDispatcherFactory, IPyWidgetMessageDispatcherFactory);
214-
215-
// Temporary code, to allow users to revert to the old behavior.
216-
const cfg = serviceManager.get<IWorkspaceService>(IWorkspaceService).getConfiguration('python.dataScience', undefined);
217-
if (cfg.get<boolean>('useOldJupyterServer', false)) {
218-
serviceManager.addSingleton<IJupyterInterpreterDependencyManager>(IJupyterInterpreterDependencyManager, JupyterCommandInterpreterDependencyService);
219-
serviceManager.addSingleton<IJupyterSubCommandExecutionService>(IJupyterSubCommandExecutionService, JupyterCommandFinderInterpreterExecutionService);
220-
} else {
221-
serviceManager.addSingleton<IJupyterInterpreterDependencyManager>(IJupyterInterpreterDependencyManager, JupyterInterpreterSubCommandExecutionService);
222-
serviceManager.addSingleton<IJupyterSubCommandExecutionService>(IJupyterSubCommandExecutionService, JupyterInterpreterSubCommandExecutionService);
223-
}
210+
serviceManager.addSingleton<IJupyterInterpreterDependencyManager>(IJupyterInterpreterDependencyManager, JupyterInterpreterSubCommandExecutionService);
211+
serviceManager.addSingleton<IJupyterSubCommandExecutionService>(IJupyterSubCommandExecutionService, JupyterInterpreterSubCommandExecutionService);
224212

225213
registerGatherTypes(serviceManager);
226214
}

src/client/telemetry/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,6 @@ export interface IEventNamePropertyMapping {
15161516
[EventName.WORKSPACE_SYMBOLS_GO_TO]: never | undefined;
15171517
// Data Science
15181518
[Telemetry.AddCellBelow]: never | undefined;
1519-
[Telemetry.ClassConstructionTime]: { class: string };
15201519
[Telemetry.CodeLensAverageAcquisitionTime]: never | undefined;
15211520
[Telemetry.CollapseAll]: never | undefined;
15221521
[Telemetry.ConnectFailedJupyter]: never | undefined;

0 commit comments

Comments
 (0)