Skip to content

Commit f905895

Browse files
authored
Merge branch 'main' into switch-poetry-terminal-activation
2 parents 9618672 + f622704 commit f905895

9 files changed

Lines changed: 27 additions & 38 deletions

File tree

.github/workflows/pr-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- release*
99

1010
env:
11-
NODE_VERSION: '20.18.0'
11+
NODE_VERSION: '20.18.1'
1212

1313
jobs:
1414
build-vsix:

.github/workflows/push-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- 'release-*'
1010

1111
env:
12-
NODE_VERSION: '20.18.0'
12+
NODE_VERSION: '20.18.1'
1313

1414
jobs:
1515
build-vsix:

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.18.0
1+
20.18.1

build/azure-pipeline.pre-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ extends:
6666
buildSteps:
6767
- task: NodeTool@0
6868
inputs:
69-
versionSpec: '20.18.0'
69+
versionSpec: '20.18.1'
7070
displayName: Select Node version
7171

7272
- task: UsePythonVersion@0

build/azure-pipeline.stable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ extends:
5656
buildSteps:
5757
- task: NodeTool@0
5858
inputs:
59-
versionSpec: '20.18.0'
59+
versionSpec: '20.18.1'
6060
displayName: Select Node version
6161

6262
- task: UsePythonVersion@0

examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Requirements
22

3-
1. `node` >= 20.18.0
3+
1. `node` >= 20.18.1
44
2. `npm` >= 10.9.0
55
3. `yo` >= 5.0.0 (installed via `npm install -g yo`)
66
4. `generator-code` >= 1.11.4 (installed via `npm install -g generator-code`)

src/common/localize.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ export namespace PackageManagement {
3636
export const enterPackageNames = l10n.t('Enter package names');
3737
export const searchCommonPackages = l10n.t('Search common `PyPI` packages');
3838
export const searchCommonPackagesDescription = l10n.t('Search and Install common `PyPI` packages');
39-
export const workspaceDependencies = l10n.t('Install workspace dependencies');
40-
export const workspaceDependenciesDescription = l10n.t('Install dependencies found in the current workspace.');
39+
export const workspaceDependencies = l10n.t('Install project dependencies');
40+
export const workspaceDependenciesDescription = l10n.t('Install packages found in dependency files.');
4141
export const selectPackagesToUninstall = l10n.t('Select packages to uninstall');
4242
export const enterPackagesPlaceHolder = l10n.t('Enter package names separated by space');
4343
export const editArguments = l10n.t('Edit arguments');

src/managers/builtin/venvUtils.ts

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -371,16 +371,22 @@ export async function quickCreateVenv(
371371
if (additionalPackages) {
372372
allPackages.push(...additionalPackages);
373373
}
374-
return await createWithProgress(
375-
nativeFinder,
376-
api,
377-
log,
378-
manager,
379-
baseEnv,
380-
venvRoot,
381-
path.join(venvRoot.fsPath, '.venv'),
382-
{ install: allPackages, uninstall: [] },
383-
);
374+
375+
// Check if .venv already exists
376+
let venvPath = path.join(venvRoot.fsPath, '.venv');
377+
if (await fsapi.pathExists(venvPath)) {
378+
// increment to create a unique name, e.g. .venv-1
379+
let i = 1;
380+
while (await fsapi.pathExists(`${venvPath}-${i}`)) {
381+
i++;
382+
}
383+
venvPath = `${venvPath}-${i}`;
384+
}
385+
386+
return await createWithProgress(nativeFinder, api, log, manager, baseEnv, venvRoot, venvPath, {
387+
install: allPackages,
388+
uninstall: [],
389+
});
384390
}
385391

386392
export async function createPythonVenv(
@@ -393,7 +399,6 @@ export async function createPythonVenv(
393399
options: { showQuickAndCustomOptions: boolean; additionalPackages?: string[] },
394400
): Promise<PythonEnvironment | undefined> {
395401
const sortedEnvs = ensureGlobalEnv(basePythons, log);
396-
const project = api.getPythonProject(venvRoot);
397402

398403
let customize: boolean | undefined = true;
399404
if (options.showQuickAndCustomOptions) {
@@ -403,26 +408,11 @@ export async function createPythonVenv(
403408
if (customize === undefined) {
404409
return;
405410
} else if (customize === false) {
406-
sendTelemetryEvent(EventNames.VENV_CREATION, undefined, { creationType: 'quick' });
407-
const installables = await getProjectInstallable(api, project ? [project] : undefined);
408-
const allPackages = [];
409-
allPackages.push(...(installables?.flatMap((i) => i.args ?? []) ?? []));
410-
if (options.additionalPackages) {
411-
allPackages.push(...options.additionalPackages);
412-
}
413-
return await createWithProgress(
414-
nativeFinder,
415-
api,
416-
log,
417-
manager,
418-
sortedEnvs[0],
419-
venvRoot,
420-
path.join(venvRoot.fsPath, '.venv'),
421-
{ install: allPackages, uninstall: [] },
422-
);
411+
return quickCreateVenv(nativeFinder, api, log, manager, sortedEnvs[0], venvRoot, options.additionalPackages);
423412
} else {
424413
sendTelemetryEvent(EventNames.VENV_CREATION, undefined, { creationType: 'custom' });
425414
}
415+
const project = api.getPythonProject(venvRoot);
426416

427417
const basePython = await pickEnvironmentFrom(sortedEnvs);
428418
if (!basePython || !basePython.execInfo) {

src/managers/poetry/poetryManager.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as path from 'path';
2-
import { Disposable, EventEmitter, MarkdownString, ProgressLocation, ThemeIcon, Uri } from 'vscode';
2+
import { Disposable, EventEmitter, MarkdownString, ProgressLocation, Uri } from 'vscode';
33
import {
44
DidChangeEnvironmentEventArgs,
55
DidChangeEnvironmentsEventArgs,
@@ -49,7 +49,6 @@ export class PoetryManager implements EnvironmentManager, Disposable {
4949
this.displayName = 'Poetry';
5050
this.preferredPackageManagerId = 'ms-python.python:poetry';
5151
this.tooltip = new MarkdownString(PoetryStrings.poetryManager, true);
52-
this.iconPath = new ThemeIcon('python');
5352
}
5453

5554
name: string;

0 commit comments

Comments
 (0)