diff --git a/package.nls.json b/package.nls.json index 40e60ba8e39f..ff4f684fcaf1 100644 --- a/package.nls.json +++ b/package.nls.json @@ -240,9 +240,9 @@ "DataScience.liveShareServiceFailure": "Failure starting '{0}' service during live share connection.", "DataScience.documentMismatch": "Cannot run cells, duplicate documents for {0} found.", "DataScience.pythonInteractiveCreateFailed": "Failure to create a 'Python Interactive' window. Try reinstalling the Python extension.", - "diagnostics.removePythonPathSettingsJson": "The setting \"python.pythonPath\" defined in your workspace settings is now deprecated. Do you want us to delete it? This will only remove the \"python.pythonPath\" entry from your settings.json.", - "diagnostics.removePythonPathCodeWorkspace": "The setting \"python.pythonPath\" defined in your workspace settings is now deprecated. Do you want us to delete it? This will only remove the \"python.pythonPath\" entry from your .code-workspace file.", - "diagnostics.removePythonPathCodeWorkspaceAndSettingsJson": "The setting \"python.pythonPath\" defined in your workspace settings is now deprecated. Do you want us to delete it? This will only remove the \"python.pythonPath\" entry from your settings.json and .code-workspace file.", + "diagnostics.removePythonPathSettingsJson": "The setting \"python.pythonPath\" defined in your settings.json is now deprecated. Do you want us to delete it from your settings.json only? [Learn more](https://aka.ms/AA7jfor).", + "diagnostics.removePythonPathCodeWorkspace": "The setting \"python.pythonPath\" defined in your workspace settings is now deprecated. Do you want us to delete it from your .code-workspace file only? [Learn more](https://aka.ms/AA7jfor).", + "diagnostics.removePythonPathCodeWorkspaceAndSettingsJson": "The setting \"python.pythonPath\" defined in your workspace settings is now deprecated. Do you want us to delete it from your .code-workspace file and settings.json? [Learn more](https://aka.ms/AA7jfor).", "diagnostics.warnSourceMaps": "Source map support is enabled in the Python Extension, this will adversely impact performance of the extension.", "diagnostics.disableSourceMaps": "Disable Source Map Support", "diagnostics.warnBeforeEnablingSourceMaps": "Enabling source map support in the Python Extension will adversely impact performance of the extension.", diff --git a/src/client/application/diagnostics/checks/pythonPathDeprecated.ts b/src/client/application/diagnostics/checks/pythonPathDeprecated.ts index 6ba46dd11042..80dd0d5b0cbc 100644 --- a/src/client/application/diagnostics/checks/pythonPathDeprecated.ts +++ b/src/client/application/diagnostics/checks/pythonPathDeprecated.ts @@ -9,7 +9,6 @@ import { IWorkspaceService } from '../../../common/application/types'; import { DeprecatePythonPath } from '../../../common/experimentGroups'; import { IDisposableRegistry, IExperimentsManager, Resource } from '../../../common/types'; import { Common, Diagnostics } from '../../../common/utils/localize'; -import { learnMoreOnInterpreterSecurityURI } from '../../../interpreter/autoSelection/constants'; import { IServiceContainer } from '../../../ioc/types'; import { BaseDiagnostic, BaseDiagnosticsService } from '../base'; import { IDiagnosticsCommandFactory } from '../commands/types'; @@ -97,13 +96,6 @@ export class PythonPathDeprecatedDiagnosticService extends BaseDiagnosticsServic { prompt: Common.noIWillDoItLater() }, - { - prompt: Common.moreInfo(), - command: commandFactory.createCommand(diagnostic, { - type: 'launch', - options: learnMoreOnInterpreterSecurityURI - }) - }, { prompt: Common.doNotShowAgain(), command: commandFactory.createCommand(diagnostic, { type: 'ignore', options: DiagnosticScope.Global }) diff --git a/src/client/common/utils/localize.ts b/src/client/common/utils/localize.ts index 37c84003fc09..04b952ff57dd 100644 --- a/src/client/common/utils/localize.ts +++ b/src/client/common/utils/localize.ts @@ -32,15 +32,15 @@ export namespace Diagnostics { ); export const removePythonPathSettingsJson = localize( 'diagnostics.removePythonPathSettingsJson', - 'The setting "python.pythonPath" defined in your workspace settings is now deprecated. Do you want us to delete it? This will only remove the "python.pythonPath" entry from your settings.json.' + 'The setting "python.pythonPath" defined in your settings.json is now deprecated. Do you want us to delete it from your settings.json only? [Learn more](https://aka.ms/AA7jfor).' ); export const removePythonPathCodeWorkspace = localize( 'diagnostics.removePythonPathCodeWorkspace', - 'The setting "python.pythonPath" defined in your workspace settings is now deprecated. Do you want us to delete it? This will only remove the "python.pythonPath" entry from your .code-workspace file.' + 'The setting "python.pythonPath" defined in your workspace settings is now deprecated. Do you want us to delete it from your .code-workspace file only? [Learn more](https://aka.ms/AA7jfor).' ); export const removePythonPathCodeWorkspaceAndSettingsJson = localize( 'diagnostics.removePythonPathCodeWorkspaceAndSettingsJson', - 'The setting "python.pythonPath" defined in your workspace settings is now deprecated. Do you want us to delete it? This will only remove the "python.pythonPath" entry from your settings.json and .code-workspace file.' + 'The setting "python.pythonPath" defined in your workspace settings is now deprecated. Do you want us to delete it from your .code-workspace file and settings.json? [Learn more](https://aka.ms/AA7jfor).' ); export const invalidPythonPathInDebuggerSettings = localize( 'diagnostics.invalidPythonPathInDebuggerSettings', diff --git a/src/test/application/diagnostics/checks/pythonPathDeprecated.unit.test.ts b/src/test/application/diagnostics/checks/pythonPathDeprecated.unit.test.ts index 05bfaa95d6a7..014bf92eff1e 100644 --- a/src/test/application/diagnostics/checks/pythonPathDeprecated.unit.test.ts +++ b/src/test/application/diagnostics/checks/pythonPathDeprecated.unit.test.ts @@ -142,7 +142,6 @@ suite('Application Diagnostics - Python Path Deprecated', () => { }); test('Python Path Deprecated Diagnostic is handled as expected', async () => { const diagnostic = new PythonPathDeprecatedDiagnostic('message', resource); - const launchCmd = ({ cmd: 'launchCmd' } as any) as IDiagnosticCommand; const ignoreCmd = ({ cmd: 'ignoreCmd' } as any) as IDiagnosticCommand; filterService .setup((f) => @@ -155,15 +154,6 @@ suite('Application Diagnostics - Python Path Deprecated', () => { .callback((_d, p: MessageCommandPrompt) => (messagePrompt = p)) .returns(() => Promise.resolve()) .verifiable(typemoq.Times.once()); - commandFactory - .setup((f) => - f.createCommand( - typemoq.It.isAny(), - typemoq.It.isObjectWith>({ type: 'launch' }) - ) - ) - .returns(() => launchCmd) - .verifiable(typemoq.Times.once()); commandFactory .setup((f) => @@ -180,16 +170,12 @@ suite('Application Diagnostics - Python Path Deprecated', () => { messageHandler.verifyAll(); commandFactory.verifyAll(); expect(messagePrompt).not.be.equal(undefined, 'Message prompt not set'); - expect(messagePrompt!.commandPrompts.length).to.equal(4, 'Incorrect length'); + expect(messagePrompt!.commandPrompts.length).to.equal(3, 'Incorrect length'); expect(messagePrompt!.commandPrompts[0].command).not.be.equal(undefined, 'Command not set'); expect(messagePrompt!.commandPrompts[0].command!.diagnostic).to.be.deep.equal(diagnostic); expect(messagePrompt!.commandPrompts[0].prompt).to.be.deep.equal(Common.yesPlease()); expect(messagePrompt!.commandPrompts[1]).to.be.deep.equal({ prompt: Common.noIWillDoItLater() }); expect(messagePrompt!.commandPrompts[2]).to.be.deep.equal({ - prompt: Common.moreInfo(), - command: launchCmd - }); - expect(messagePrompt!.commandPrompts[3]).to.be.deep.equal({ prompt: Common.doNotShowAgain(), command: ignoreCmd });