From 8314cd49bd5b4fd976afd8af75be33dc5c903dbc Mon Sep 17 00:00:00 2001 From: Eduardo Villalpando Mello Date: Mon, 24 Aug 2026 10:43:51 -0700 Subject: [PATCH 1/3] [Draft] Enable PyREPL for 3.13 and above --- src/client/terminals/pythonStartup.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/client/terminals/pythonStartup.ts b/src/client/terminals/pythonStartup.ts index b6f68c860b46..46297978938c 100644 --- a/src/client/terminals/pythonStartup.ts +++ b/src/client/terminals/pythonStartup.ts @@ -22,8 +22,6 @@ async function applyPythonStartupSetting(context: ExtensionContext): Promise Date: Mon, 24 Aug 2026 14:50:18 -0700 Subject: [PATCH 2/3] Update PyREPL shell integration tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d598cbab-c8ac-496d-9757-ac98a8c9846f --- src/client/common/utils/localize.ts | 2 +- .../shellIntegration/pythonStartup.test.ts | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/client/common/utils/localize.ts b/src/client/common/utils/localize.ts index 7b7560c74e05..178e7f263761 100644 --- a/src/client/common/utils/localize.ts +++ b/src/client/common/utils/localize.ts @@ -218,7 +218,7 @@ export namespace Interpreters { '{0} environment was successfully activated, even though {1} indicator may not be present in the terminal prompt. [Learn more](https://aka.ms/vscodePythonTerminalActivation).', ); export const shellIntegrationEnvVarCollectionDescription = l10n.t( - 'Enables `python.terminal.shellIntegration.enabled` by modifying `PYTHONSTARTUP` and `PYTHON_BASIC_REPL`', + 'Enables `python.terminal.shellIntegration.enabled` by modifying `PYTHONSTARTUP`', ); export const shellIntegrationDisabledEnvVarCollectionDescription = l10n.t( 'Disables `python.terminal.shellIntegration.enabled` by unsetting `PYTHONSTARTUP` and `PYTHON_BASIC_REPL`', diff --git a/src/test/terminals/shellIntegration/pythonStartup.test.ts b/src/test/terminals/shellIntegration/pythonStartup.test.ts index 833a4f29e972..7e020e70e48e 100644 --- a/src/test/terminals/shellIntegration/pythonStartup.test.ts +++ b/src/test/terminals/shellIntegration/pythonStartup.test.ts @@ -135,11 +135,24 @@ suite('Terminal - Shell Integration with PYTHONSTARTUP', () => { globalEnvironmentVariableCollection.verify((c) => c.delete('PYTHONSTARTUP'), TypeMoq.Times.once()); }); - test('PYTHON_BASIC_REPL is set when shell integration is enabled', async () => { + test('PYTHON_BASIC_REPL is not set when shell integration is enabled', async () => { pythonConfig.setup((p) => p.get('terminal.shellIntegration.enabled')).returns(() => true); + await registerPythonStartup(context.object); + + globalEnvironmentVariableCollection.verify( + (c) => c.replace('PYTHON_BASIC_REPL', TypeMoq.It.isAny(), TypeMoq.It.isAny()), + TypeMoq.Times.never(), + ); + }); + + test('PYTHON_BASIC_REPL is deleted when shell integration is disabled', async () => { + pythonConfig.setup((p) => p.get('terminal.shellIntegration.enabled')).returns(() => false); + + await registerPythonStartup(context.object); + globalEnvironmentVariableCollection.verify( - (c) => c.replace('PYTHON_BASIC_REPL', '1', TypeMoq.It.isAny()), + (c) => c.delete('PYTHON_BASIC_REPL'), TypeMoq.Times.once(), ); }); From 231426195e8c5f726921af5c1c8faaab7d895778 Mon Sep 17 00:00:00 2001 From: Eduardo Villalpando Mello Date: Mon, 24 Aug 2026 16:01:01 -0700 Subject: [PATCH 3/3] Format PyREPL shell integration tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d598cbab-c8ac-496d-9757-ac98a8c9846f --- src/test/terminals/shellIntegration/pythonStartup.test.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/test/terminals/shellIntegration/pythonStartup.test.ts b/src/test/terminals/shellIntegration/pythonStartup.test.ts index 7e020e70e48e..16f45fb26a40 100644 --- a/src/test/terminals/shellIntegration/pythonStartup.test.ts +++ b/src/test/terminals/shellIntegration/pythonStartup.test.ts @@ -151,10 +151,7 @@ suite('Terminal - Shell Integration with PYTHONSTARTUP', () => { await registerPythonStartup(context.object); - globalEnvironmentVariableCollection.verify( - (c) => c.delete('PYTHON_BASIC_REPL'), - TypeMoq.Times.once(), - ); + globalEnvironmentVariableCollection.verify((c) => c.delete('PYTHON_BASIC_REPL'), TypeMoq.Times.once()); }); test('Ensure registering terminal link calls registerTerminalLinkProvider', async () => {