Skip to content

Commit b613cf9

Browse files
Add WinPython support to the System Python manager (#1369)
fixes: #1251 PET can discover WinPython environments, but the extension was silently dropping them because `WinPython` was not a recognized `NativePythonEnvironmentKind`. WinPython is a portable Windows Python distribution that belongs under the existing System Python manager alongside `WindowsRegistry`, `WindowsStore`, and `GlobalPaths`. ## Changes - **`nativePythonFinder.ts`** — Add `winpython = 'WinPython'` to the `NativePythonEnvironmentKind` enum to match the value emitted by PET's `pet-winpython` crate. - **`managers/builtin/utils.ts`** — Add `NativePythonEnvironmentKind.winpython` to the `refreshPythons` allowlist so WinPython environments surface through the System Python manager. WinPython falls through to the `default` branch in `getKindName()`, so it displays as `Python <version>` — consistent with other undecorated system Pythons. > [!WARNING] > > <details> > <summary>Firewall rules blocked me from connecting to one or more addresses (expand for details)</summary> > > #### I tried to connect to the following addresses, but was blocked by firewall rules: > > - `https://api.github.com/graphql` > - Triggering command: `/usr/bin/gh gh issue list --state open --limit 5 --json number,title,labels` (http block) > > If you need me to access, download, or install something from one of these locations, you can either: > > - Configure [Actions setup steps](https://gh.io/copilot/actions-setup-steps) to set up my environment, which run before the firewall is enabled > - Add the appropriate URLs or hosts to the custom allowlist in this repository's [Copilot coding agent settings](https://github.com/microsoft/vscode-python-environments/settings/copilot/coding_agent) (admins only) > > </details> <!-- START COPILOT CODING AGENT TIPS --> --- 📱 Kick off Copilot coding agent tasks wherever you are with [GitHub Mobile](https://gh.io/cca-mobile-docs), available on iOS and Android. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
1 parent d2ac600 commit b613cf9

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/managers/builtin/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export async function refreshPythons(
125125
NativePythonEnvironmentKind.macXCode,
126126
NativePythonEnvironmentKind.windowsRegistry,
127127
NativePythonEnvironmentKind.windowsStore,
128+
NativePythonEnvironmentKind.winpython,
128129
].includes(e.kind)),
129130
);
130131
envs.forEach((env) => {

src/managers/common/nativePythonFinder.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ export enum NativePythonEnvironmentKind {
140140
virtualEnvWrapper = 'VirtualEnvWrapper',
141141
windowsStore = 'WindowsStore',
142142
windowsRegistry = 'WindowsRegistry',
143+
winpython = 'WinPython',
143144
}
144145

145146
export interface NativePythonFinder extends Disposable {

0 commit comments

Comments
 (0)