File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
src/client/common/terminal Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -102,10 +102,22 @@ export class TerminalService implements ITerminalService, Disposable {
102102 } ) ;
103103 await promise ;
104104 }
105-
105+ // TODO: need to use sendText for Python3.13 as well.
106106 const config = getConfiguration ( 'python' ) ;
107107 const pythonrcSetting = config . get < boolean > ( 'terminal.shellIntegration.enabled' ) ;
108- if ( ( isPythonShell && ! pythonrcSetting ) || ( isPythonShell && isWindows ( ) ) ) {
108+
109+ const pythonPath = this . serviceContainer
110+ . get < IConfigurationService > ( IConfigurationService )
111+ . getSettings ( this . options ?. resource ) . pythonPath ;
112+ const interpreterInfo =
113+ this . options ?. interpreter ||
114+ ( await this . serviceContainer
115+ . get < IInterpreterService > ( IInterpreterService )
116+ . getInterpreterDetails ( pythonPath ) ) ;
117+ const pythonVersion = interpreterInfo && interpreterInfo . version ? interpreterInfo . version . raw : undefined ;
118+ const isPython313 = pythonVersion ?. startsWith ( '3.13' ) ;
119+
120+ if ( isPythonShell && ( ! pythonrcSetting || isWindows ( ) || isWsl ( ) || isPython313 ) ) {
109121 // If user has explicitly disabled SI for Python, use sendText for inside Terminal REPL.
110122 terminal . sendText ( commandLine ) ;
111123 return undefined ;
You can’t perform that action at this time.
0 commit comments