From 8334aef1522ca94b477a9694a328e91ac05a191e Mon Sep 17 00:00:00 2001 From: Ryu Juheon Date: Tue, 11 Oct 2022 00:12:56 +0900 Subject: [PATCH] fix(poetry): --dev option is deprecated https://python-poetry.org/docs/managing-dependencies/#dependency-groups --- src/client/common/installer/poetryInstaller.ts | 2 +- src/test/common/installer/poetryInstaller.unit.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/common/installer/poetryInstaller.ts b/src/client/common/installer/poetryInstaller.ts index 0690a9eeba96..ea9de510cadd 100644 --- a/src/client/common/installer/poetryInstaller.ts +++ b/src/client/common/installer/poetryInstaller.ts @@ -70,7 +70,7 @@ export class PoetryInstaller extends ModuleInstaller { protected async getExecutionInfo(moduleName: string, resource?: InterpreterUri): Promise { const execPath = this.configurationService.getSettings(isResource(resource) ? resource : undefined).poetryPath; - const args = ['add', '--dev', moduleName]; + const args = ['add', '--group', 'dev', moduleName]; if (moduleName === 'black') { args.push('--allow-prereleases'); } diff --git a/src/test/common/installer/poetryInstaller.unit.test.ts b/src/test/common/installer/poetryInstaller.unit.test.ts index f5d36f1e2bab..9046ce59d1b0 100644 --- a/src/test/common/installer/poetryInstaller.unit.test.ts +++ b/src/test/common/installer/poetryInstaller.unit.test.ts @@ -103,7 +103,7 @@ suite('Module Installer - Poetry', () => { const info = await poetryInstaller.getExecutionInfo('something', uri); - assert.deepEqual(info, { args: ['add', '--dev', 'something'], execPath: 'poetry path' }); + assert.deepEqual(info, { args: ['add', '--group', 'dev', 'something'], execPath: 'poetry path' }); }); test('Get executable info when installing black', async () => { const uri = Uri.file(__dirname); @@ -115,7 +115,7 @@ suite('Module Installer - Poetry', () => { const info = await poetryInstaller.getExecutionInfo('black', uri); assert.deepEqual(info, { - args: ['add', '--dev', 'black', '--allow-prereleases'], + args: ['add', '--group', 'dev', 'black', '--allow-prereleases'], execPath: 'poetry path', }); });