From 865d6c21e7202225c9880c531093cfa642ed9cbb Mon Sep 17 00:00:00 2001 From: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com> Date: Thu, 19 Jun 2025 14:42:08 -0700 Subject: [PATCH 1/3] add exp setting for envs ext --- src/client/envExt/api.internal.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/envExt/api.internal.ts b/src/client/envExt/api.internal.ts index 552e31a0598e..c4247f63a3c5 100644 --- a/src/client/envExt/api.internal.ts +++ b/src/client/envExt/api.internal.ts @@ -14,6 +14,7 @@ import { } from './types'; import { executeCommand } from '../common/vscodeApis/commandApis'; import { IInterpreterPathService } from '../common/types'; +import { getConfiguration } from '../common/vscodeApis/workspaceApis'; export const ENVS_EXTENSION_ID = 'ms-python.vscode-python-envs'; @@ -22,7 +23,9 @@ export function useEnvExtension(): boolean { if (_useExt !== undefined) { return _useExt; } - _useExt = !!getExtension(ENVS_EXTENSION_ID); + const inExpSetting = getConfiguration('python').get('useEnvironmentsExtension', false); + // If extension is installed and in experiment, then use it. + _useExt = !!getExtension(ENVS_EXTENSION_ID) && inExpSetting; return _useExt; } From 601015d35ec31a7e1afea21f566a14cadc1139e9 Mon Sep 17 00:00:00 2001 From: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com> Date: Thu, 26 Jun 2025 11:03:17 -0700 Subject: [PATCH 2/3] add as dep --- gulpfile.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index f921ff7fd1b1..0b919f16572a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -98,9 +98,11 @@ async function addExtensionPackDependencies() { // extension dependencies need not be installed during development const packageJsonContents = await fsExtra.readFile('package.json', 'utf-8'); const packageJson = JSON.parse(packageJsonContents); - packageJson.extensionPack = ['ms-python.vscode-pylance', 'ms-python.debugpy'].concat( - packageJson.extensionPack ? packageJson.extensionPack : [], - ); + packageJson.extensionPack = [ + 'ms-python.vscode-pylance', + 'ms-python.debugpy', + 'ms-python.vscode-python-envs', + ].concat(packageJson.extensionPack ? packageJson.extensionPack : []); // Remove potential duplicates. packageJson.extensionPack = packageJson.extensionPack.filter( (item, index) => packageJson.extensionPack.indexOf(item) === index, From 81999f64e981b3ac6fbee280a886fb8a71598beb Mon Sep 17 00:00:00 2001 From: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com> Date: Thu, 26 Jun 2025 11:06:09 -0700 Subject: [PATCH 3/3] update description --- package.nls.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.nls.json b/package.nls.json index 560e78de05a5..00c96c09b19a 100644 --- a/package.nls.json +++ b/package.nls.json @@ -38,7 +38,7 @@ "python.debugger.deprecatedMessage": "This configuration will be deprecated soon. Please replace `python` with `debugpy` to use the new Python Debugger extension.", "python.defaultInterpreterPath.description": "Path to default Python to use when extension loads up for the first time, no longer used once an interpreter is selected for the workspace. See [here](https://aka.ms/AAfekmf) to understand when this is used", "python.envFile.description": "Absolute path to a file containing environment variable definitions.", - "python.useEnvironmentsExtension.description": "Enables the Python Environments extension.", + "python.useEnvironmentsExtension.description": "Enables the Python Environments extension. Requires window reload on change.", "python.experiments.enabled.description": "Enables A/B tests experiments in the Python extension. If enabled, you may get included in proposed enhancements and/or features.", "python.experiments.optInto.description": "List of experiments to opt into. If empty, user is assigned the default experiment groups. See [here](https://github.com/microsoft/vscode-python/wiki/AB-Experiments) for more details.", "python.experiments.optOutFrom.description": "List of experiments to opt out of. If empty, user is assigned the default experiment groups. See [here](https://github.com/microsoft/vscode-python/wiki/AB-Experiments) for more details.", @@ -92,7 +92,7 @@ "python.venvPath.description": "Path to folder with a list of Virtual Environments (e.g. ~/.pyenv, ~/Envs, ~/.virtualenvs).", "walkthrough.pythonWelcome.title": "Get Started with Python Development", "walkthrough.pythonWelcome.description": "Your first steps to set up a Python project with all the powerful tools and features that the Python extension has to offer!", - "walkthrough.step.python.createPythonFile.title": "Create a Python file", + "walkthrough.step.python.createPythonFile.title": "Create a Python file", "walkthrough.step.python.createPythonFolder.title": "Open a Python project folder", "walkthrough.step.python.createPythonFile.description": { "message": "[Open](command:toSide:workbench.action.files.openFile) or [create](command:toSide:workbench.action.files.newUntitledFile?%7B%22languageId%22%3A%22python%22%7D) a Python file - make sure to save it as \".py\".\n[Create Python File](command:toSide:workbench.action.files.newUntitledFile?%7B%22languageId%22%3A%22python%22%7D)", @@ -104,7 +104,7 @@ }, "walkthrough.step.python.createPythonFolder.description": { "message": "[Open](command:workbench.action.files.openFolder) or create a project folder.\n[Open Project Folder](command:workbench.action.files.openFolder)", - "comment": [ + "comment": [ "{Locked='](command:workbench.action.files.openFolder'}", "Do not translate the 'command:*' part inside of the '(..)'. It is an internal command syntax for VS Code", "Please make sure there is no space between the right bracket and left parenthesis: ]( this is an internal syntax for links" @@ -134,7 +134,7 @@ "walkthrough.step.python.createEnvironment.title": "Select or create a Python environment", "walkthrough.step.python.createEnvironment.description": { "message": "Create an environment for your Python project or use [Select Python Interpreter](command:python.setInterpreter) to select an existing one.\n[Create Environment](command:python.createEnvironment)\n**Tip**: Run the ``Python: Create Environment`` command in the [Command Palette](command:workbench.action.showCommands).", - "comment": [ + "comment": [ "{Locked='](command:python.createEnvironment'}", "{Locked='](command:workbench.action.showCommands'}", "{Locked='](command:python.setInterpreter'}", @@ -146,8 +146,8 @@ "walkthrough.step.python.runAndDebug.description": "Open your Python file and click on the play button on the top right of the editor, or press F5 when on the file and select \"Python File\" to run with the debugger. \n \n[Learn more](https://code.visualstudio.com/docs/python/python-tutorial#_run-hello-world)", "walkthrough.step.python.learnMoreWithDS.title": "Keep exploring!", "walkthrough.step.python.learnMoreWithDS.description": { - "message":"🎨 Explore all the features the Python extension has to offer by looking for \"Python\" in the [Command Palette](command:workbench.action.showCommands). \n 📈 Learn more about getting started with [data science](command:workbench.action.openWalkthrough?%7B%22category%22%3A%22ms-python.python%23pythonDataScienceWelcome%22%2C%22step%22%3A%22ms-python.python%23python.createNewNotebook%22%7D) in Python. \n ✨ Take a look at our [Release Notes](https://aka.ms/AA8dxtb) to learn more about the latest features. \n \n[Follow along with the Python Tutorial](https://aka.ms/AA8dqti)", - "comment":[ + "message": "🎨 Explore all the features the Python extension has to offer by looking for \"Python\" in the [Command Palette](command:workbench.action.showCommands). \n 📈 Learn more about getting started with [data science](command:workbench.action.openWalkthrough?%7B%22category%22%3A%22ms-python.python%23pythonDataScienceWelcome%22%2C%22step%22%3A%22ms-python.python%23python.createNewNotebook%22%7D) in Python. \n ✨ Take a look at our [Release Notes](https://aka.ms/AA8dxtb) to learn more about the latest features. \n \n[Follow along with the Python Tutorial](https://aka.ms/AA8dqti)", + "comment": [ "{Locked='](command:workbench.action.showCommands'}", "{Locked='](command:workbench.action.openWalkthrough?%7B%22category%22%3A%22ms-python.python%23pythonDataScienceWelcome%22%2C%22step%22%3A%22ms-python.python%23python.createNewNotebook%22%7D'}", "Do not translate the 'command:*' part inside of the '(..)'. It is an internal command syntax for VS Code",