22// Licensed under the MIT License.
33'use strict' ;
44import { IExtensionSingleActivationService } from '../activation/types' ;
5- import { IApplicationEnvironment , IWorkspaceService } from '../common/application/types' ;
5+ import { IApplicationEnvironment } from '../common/application/types' ;
66import { UseCustomEditorApi } from '../common/constants' ;
77import { IServiceManager } from '../ioc/types' ;
88import { Activation } from './activation' ;
@@ -48,9 +48,6 @@ import { IPyWidgetMessageDispatcherFactory } from './ipywidgets/ipyWidgetMessage
4848import { IPyWidgetScriptSource } from './ipywidgets/ipyWidgetScriptSource' ;
4949import { JupyterCommandLineSelector } from './jupyter/commandLineSelector' ;
5050import { 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' ;
5451import { JupyterInterpreterDependencyService } from './jupyter/interpreter/jupyterInterpreterDependencyService' ;
5552import { JupyterInterpreterOldCacheStateStore } from './jupyter/interpreter/jupyterInterpreterOldCacheStateStore' ;
5653import { 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}
0 commit comments