Skip to content

Commit 0cefbd1

Browse files
authored
Merge branch 'main' into delighted-rabbit
2 parents 8ae9f11 + b2ba6c8 commit 0cefbd1

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

build/azure-pipeline.stable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ extends:
112112
project: 'Monaco'
113113
definition: 593
114114
buildVersionToDownload: 'latestFromBranch'
115-
branchName: 'refs/heads/release/2025.10'
115+
branchName: 'refs/heads/release/2025.16'
116116
targetPath: '$(Build.SourcesDirectory)/python-env-tools/bin'
117117
artifactName: 'bin-$(buildTarget)'
118118
itemPattern: |

src/managers/builtin/venvUtils.ts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ async function getPythonInfo(env: NativeEnvInfo): Promise<PythonEnvironmentInfo>
135135
let description = undefined;
136136
if (env.kind === NativePythonEnvironmentKind.venvUv) {
137137
description = l10n.t('uv');
138+
} else if (env.kind === NativePythonEnvironmentKind.uvWorkspace) {
139+
description = l10n.t('uv workspace');
138140
}
139141

140142
const binDir = path.dirname(env.executable);
@@ -181,7 +183,12 @@ export async function findVirtualEnvironments(
181183
const envs = data
182184
.filter((e) => isNativeEnvInfo(e))
183185
.map((e) => e as NativeEnvInfo)
184-
.filter((e) => e.kind === NativePythonEnvironmentKind.venv || e.kind === NativePythonEnvironmentKind.venvUv);
186+
.filter(
187+
(e) =>
188+
e.kind === NativePythonEnvironmentKind.venv ||
189+
e.kind === NativePythonEnvironmentKind.venvUv ||
190+
e.kind === NativePythonEnvironmentKind.uvWorkspace,
191+
);
185192

186193
for (const e of envs) {
187194
if (!(e.prefix && e.executable && e.version)) {
@@ -194,7 +201,7 @@ export async function findVirtualEnvironments(
194201
log.info(`Found venv environment: ${env.name}`);
195202

196203
// Track UV environments using environmentPath for consistency
197-
if (e.kind === NativePythonEnvironmentKind.venvUv) {
204+
if (e.kind === NativePythonEnvironmentKind.venvUv || e.kind === NativePythonEnvironmentKind.uvWorkspace) {
198205
await addUvEnvironment(env.environmentPath.fsPath);
199206
}
200207
}
@@ -326,7 +333,11 @@ export async function createWithProgress(
326333
const resolved = await nativeFinder.resolve(pythonPath);
327334
const env = api.createPythonEnvironmentItem(await getPythonInfo(resolved), manager);
328335

329-
if (useUv && resolved.kind === NativePythonEnvironmentKind.venvUv) {
336+
if (
337+
useUv &&
338+
(resolved.kind === NativePythonEnvironmentKind.venvUv ||
339+
resolved.kind === NativePythonEnvironmentKind.uvWorkspace)
340+
) {
330341
await addUvEnvironment(env.environmentPath.fsPath);
331342
}
332343

@@ -525,7 +536,11 @@ export async function resolveVenvPythonEnvironmentPath(
525536
): Promise<PythonEnvironment | undefined> {
526537
const resolved = await nativeFinder.resolve(fsPath);
527538

528-
if (resolved.kind === NativePythonEnvironmentKind.venv || resolved.kind === NativePythonEnvironmentKind.venvUv) {
539+
if (
540+
resolved.kind === NativePythonEnvironmentKind.venv ||
541+
resolved.kind === NativePythonEnvironmentKind.venvUv ||
542+
resolved.kind === NativePythonEnvironmentKind.uvWorkspace
543+
) {
529544
const envInfo = await getPythonInfo(resolved);
530545
return api.createPythonEnvironmentItem(envInfo, manager);
531546
}

src/managers/common/nativePythonFinder.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export enum NativePythonEnvironmentKind {
6868
macCommandLineTools = 'MacCommandLineTools',
6969
linuxGlobal = 'LinuxGlobal',
7070
macXCode = 'MacXCode',
71+
uvWorkspace = 'UvWorkspace',
7172
venv = 'Venv',
7273
venvUv = 'Uv',
7374
virtualEnv = 'VirtualEnv',

0 commit comments

Comments
 (0)