Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cherry pick Prep for trusted workspaces work (#16485) into main #16508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ src/test/interpreters/mocks.ts
src/test/interpreters/interpreterVersion.unit.test.ts
src/test/interpreters/virtualEnvs/index.unit.test.ts
src/test/interpreters/virtualEnvs/condaInheritEnvPrompt.unit.test.ts
src/test/interpreters/autoSelection/interpreterSecurity/interpreterEvaluation.unit.test.ts
src/test/interpreters/autoSelection/interpreterSecurity/interpreterSecurityService.unit.test.ts
src/test/interpreters/autoSelection/rules/settings.unit.test.ts
src/test/interpreters/autoSelection/rules/cached.unit.test.ts
src/test/interpreters/autoSelection/rules/winRegistry.unit.test.ts
Expand All @@ -56,8 +54,6 @@ src/test/interpreters/helpers.unit.test.ts
src/test/interpreters/currentPathService.unit.test.ts
src/test/interpreters/display.unit.test.ts

src/test/configuration/interpreterSelector/interpreterSelector.unit.test.ts

src/test/terminals/codeExecution/terminalCodeExec.unit.test.ts
src/test/terminals/codeExecution/codeExecutionManager.unit.test.ts
src/test/terminals/codeExecution/djangoShellCodeExect.unit.test.ts
Expand Down Expand Up @@ -93,7 +89,6 @@ src/test/activation/activeResource.unit.test.ts
src/test/activation/node/languageServerChangeHandler.unit.test.ts
src/test/activation/node/activator.unit.test.ts
src/test/activation/extensionSurvey.unit.test.ts
src/test/activation/activationManager.unit.test.ts

src/test/utils/fs.ts

Expand All @@ -111,7 +106,6 @@ src/test/api.functional.test.ts
src/test/testing/argsService.test.ts
src/test/testing/mocks.ts
src/test/testing/debugger.test.ts
src/test/testing/serviceRegistry.ts
src/test/testing/unittest/unittest.test.ts
src/test/testing/unittest/unittest.discovery.unit.test.ts
src/test/testing/unittest/unittest.discovery.test.ts
Expand Down Expand Up @@ -180,7 +174,6 @@ src/test/common/utils/cacheUtils.unit.test.ts
src/test/common/utils/decorators.unit.test.ts
src/test/common/utils/localize.functional.test.ts
src/test/common/utils/version.unit.test.ts
src/test/common/configSettings/configSettings.pythonPath.unit.test.ts
src/test/common/configSettings/configSettings.unit.test.ts
src/test/common/featureDeprecationManager.unit.test.ts
src/test/common/serviceRegistry.unit.test.ts
Expand Down Expand Up @@ -287,7 +280,6 @@ src/client/interpreter/configuration/interpreterComparer.ts
src/client/interpreter/configuration/interpreterSelector/commands/base.ts
src/client/interpreter/configuration/interpreterSelector/commands/resetInterpreter.ts
src/client/interpreter/configuration/interpreterSelector/commands/setShebangInterpreter.ts
src/client/interpreter/configuration/interpreterSelector/interpreterSelector.ts
src/client/interpreter/configuration/pythonPathUpdaterServiceFactory.ts
src/client/interpreter/configuration/services/globalUpdaterService.ts
src/client/interpreter/configuration/services/workspaceUpdaterService.ts
Expand All @@ -296,9 +288,6 @@ src/client/interpreter/helpers.ts
src/client/interpreter/virtualEnvs/condaInheritEnvPrompt.ts
src/client/interpreter/virtualEnvs/types.ts
src/client/interpreter/virtualEnvs/index.ts
src/client/interpreter/autoSelection/interpreterSecurity/interpreterSecurityStorage.ts
src/client/interpreter/autoSelection/interpreterSecurity/interpreterEvaluation.ts
src/client/interpreter/autoSelection/interpreterSecurity/interpreterSecurityService.ts
src/client/interpreter/autoSelection/rules/baseRule.ts
src/client/interpreter/autoSelection/rules/winRegistry.ts
src/client/interpreter/autoSelection/rules/settings.ts
Expand Down Expand Up @@ -353,7 +342,6 @@ src/client/activation/languageServer/languageServerPackageService.ts
src/client/activation/languageServer/analysisOptions.ts
src/client/activation/languageServer/activator.ts
src/client/activation/commands.ts
src/client/activation/activationManager.ts
src/client/activation/progress.ts
src/client/activation/extensionSurvey.ts
src/client/activation/common/languageServerChangeHandler.ts
Expand Down Expand Up @@ -509,7 +497,6 @@ src/client/common/dotnet/services/macCompatibilityService.ts
src/client/common/dotnet/services/linuxCompatibilityService.ts
src/client/common/dotnet/services/windowsCompatibilityService.ts
src/client/common/logger.ts
src/client/common/constants.ts
src/client/common/variables/serviceRegistry.ts
src/client/common/variables/environment.ts
src/client/common/variables/types.ts
Expand All @@ -523,7 +510,6 @@ src/client/common/cancellation.ts
src/client/common/interpreterPathService.ts
src/client/common/startPage/startPageMessageListener.ts
src/client/common/application/customEditorService.ts
src/client/common/application/commands.ts
src/client/common/application/applicationShell.ts
src/client/common/application/languageService.ts
src/client/common/application/notebook.ts
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@
([#16141](https://github.com/Microsoft/vscode-python/issues/16141))
1. Ensure users upgrade to v0.2.0 of the torch-tb-profiler TensorBoard plugin to access jump-to-source functionality.
([#16330](https://github.com/Microsoft/vscode-python/issues/16330))
1. Added `python.defaultInterpreterPath` setting at workspace level when in `pythonDeprecatePythonPath` experiment.
([#16485](https://github.com/Microsoft/vscode-python/issues/16485))
1. Added default Interpreter path entry at the bottom of the interpreter list.
([#16485](https://github.com/Microsoft/vscode-python/issues/16485))
1. Remove execution isolation script used to run tools.
([#16485](https://github.com/Microsoft/vscode-python/issues/16485))
1. Show `python.pythonPath` deprecation prompt when in `pythonDeprecatePythonPath` experiment.
([#16485](https://github.com/Microsoft/vscode-python/issues/16485))
1. Do not show safety prompt before autoselecting a workspace interpreter.
([#16485](https://github.com/Microsoft/vscode-python/issues/16485))
1. Assume workspace interpreters are safe to execute for discovery.
([#16485](https://github.com/Microsoft/vscode-python/issues/16485))

### Fixes
1. Fixes a bug in the bandit linter where messages weren't being propagated to the editor.
Expand Down
29 changes: 6 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"theme": "dark"
},
"engines": {
"vscode": "^1.54.0"
"vscode": "^1.57.0"
},
"keywords": [
"python",
Expand Down Expand Up @@ -88,7 +88,6 @@
"onCommand:python.switchToDailyChannel",
"onCommand:python.switchToWeeklyChannel",
"onCommand:python.clearWorkspaceInterpreter",
"onCommand:python.resetInterpreterSecurityStorage",
"onCommand:python.startPage.open",
"onCommand:python.enableSourceMapSupport",
"onCommand:python.launchTensorBoard",
Expand Down Expand Up @@ -235,11 +234,6 @@
"title": "%python.command.python.clearWorkspaceInterpreter.title%",
"category": "Python"
},
{
"command": "python.resetInterpreterSecurityStorage",
"title": "%python.command.python.resetInterpreterSecurityStorage.title%",
"category": "Python"
},
{
"command": "python.refactorExtractVariable",
"title": "%python.command.python.refactorExtractVariable.title%",
Expand Down Expand Up @@ -488,11 +482,6 @@
"title": "%python.command.python.clearWorkspaceInterpreter.title%",
"category": "Python"
},
{
"command": "python.resetInterpreterSecurityStorage",
"title": "%python.command.python.resetInterpreterSecurityStorage.title%",
"category": "Python"
},
{
"command": "python.viewOutput",
"title": "%python.command.python.viewOutput.title%",
Expand Down Expand Up @@ -1126,15 +1115,15 @@
"python.defaultInterpreterPath": {
"type": "string",
"default": "python",
"description": "Path to Python, you can use a custom version of Python by modifying this setting to include the full path.",
"scope": "machine"
"description": "Path to Python, you can use a custom version of Python by modifying this setting to include the full path. This default setting is used as a fallback if no interpreter is selected for the workspace. The extension will also not set nor change the value of this setting, it will only read from it.",
"scope": "resource"
},
"python.experiments.optInto": {
"type": "array",
"default": [],
"items": {
"enum": [
"DeprecatePythonPath - experiment",
"pythonDeprecatePythonPath",
"pythonTensorboardExperiment",
"pythonDiscoveryModule",
"pythonDiscoveryModuleWithoutWatcher",
Expand All @@ -1151,7 +1140,7 @@
"default": [],
"items": {
"enum": [
"DeprecatePythonPath - experiment",
"pythonDeprecatePythonPath",
"pythonTensorboardExperiment",
"pythonDiscoveryModule",
"pythonDiscoveryModuleWithoutWatcher",
Expand Down Expand Up @@ -1713,7 +1702,7 @@
"python.pythonPath": {
"type": "string",
"default": "python",
"description": "Path to Python, you can use a custom version of Python by modifying this setting to include the full path.",
"description": "(DEPRECATED: Note this setting is not used when in pythonDeprecatePythonPath experiment) Path to Python, you can use a custom version of Python by modifying this setting to include the full path.",
"scope": "resource"
},
"python.condaPath": {
Expand Down Expand Up @@ -1865,12 +1854,6 @@
"description": "Enable auto run test discovery when saving a test file.",
"scope": "resource"
},
"python.useIsolation": {
"type": "boolean",
"default": true,
"description": "Execute tools in isolation from the workspace.",
"scope": "machine"
},
"python.venvFolders": {
"type": "array",
"default": [],
Expand Down
5 changes: 2 additions & 3 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"python.command.python.switchToDailyChannel.title": "Switch to Insiders Daily Channel",
"python.command.python.switchToWeeklyChannel.title": "Switch to Insiders Weekly Channel",
"python.command.python.clearWorkspaceInterpreter.title": "Clear Workspace Interpreter Setting",
"python.command.python.resetInterpreterSecurityStorage.title": "Reset Stored Info for Untrusted Interpreters",
"python.command.python.refactorExtractVariable.title": "Extract Variable",
"python.command.python.refactorExtractMethod.title": "Extract Method",
"python.command.python.viewOutput.title": "Show Output",
Expand Down Expand Up @@ -61,7 +60,6 @@
"Interpreters.entireWorkspace": "Entire workspace",
"Interpreters.pythonInterpreterPath": "Python interpreter path: {0}",
"Interpreters.LoadingInterpreters": "Loading Python Interpreters",
"Interpreters.unsafeInterpreterMessage": "We found a Python environment in this workspace. Do you want to select it to start up the features in the Python extension? Only accept if you trust this environment.",
"Interpreters.condaInheritEnvMessage": "We noticed you're using a conda environment. If you are experiencing issues with this environment in the integrated terminal, we recommend that you let the Python extension change \"terminal.integrated.inheritEnv\" to false in your user settings.",
"Logging.CurrentWorkingDirectory": "cwd:",
"InterpreterQuickPickList.quickPickListPlaceholder": "Current: {0}",
Expand All @@ -74,6 +72,7 @@
"InterpreterQuickPickList.browsePath.label": "Find...",
"InterpreterQuickPickList.browsePath.detail": "Browse your file system to find a Python interpreter.",
"InterpreterQuickPickList.browsePath.title": "Select Python interpreter",
"InterpreterQuickPickList.defaultInterpreterPath.label": "Use default Python interpreter path",
"diagnostics.upgradeCodeRunner": "Please update the Code Runner extension for it to be compatible with the Python extension.",
"Common.bannerLabelYes": "Yes",
"Common.bannerLabelNo": "No",
Expand Down Expand Up @@ -119,7 +118,7 @@
"Installer.searchForHelp": "Search for help",
"Installer.couldNotInstallLibrary": "Could not install {0}. If pip is not available, please use the package manager of your choice to manually install this library into your Python environment.",
"Installer.dataScienceInstallPrompt": "Data Science library {0} is not installed. Install?",
"diagnostics.removedPythonPathFromSettings": "We removed the \"python.pythonPath\" setting from your settings.json file as the setting is no longer used by the Python extension. You can get the path of your selected interpreter in the Python output channel. [Learn more](https://aka.ms/AA7jfor).",
"diagnostics.removedPythonPathFromSettings": "The \"python.pythonPath\" setting in your settings.json is no longer used by the Python extension. If you want, you can use a new setting called \"python.defaultInterpreterPath\" instead. Keep in mind that you need to change the value of this setting manually as the Python extension doesn’t modify it when you change interpreters. [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.",
Expand Down
3 changes: 0 additions & 3 deletions package.nls.zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"python.command.python.switchToDailyChannel.title": "切换到每日预览版本",
"python.command.python.switchToWeeklyChannel.title": "切换到每周预览版本",
"python.command.python.clearWorkspaceInterpreter.title": "清除工作区解释器设置",
"python.command.python.resetInterpreterSecurityStorage.title": "重置已存储的未受信任解释器的信息",
"python.command.python.refactorExtractVariable.title": "提取变量",
"python.command.python.refactorExtractMethod.title": "提取方法",
"python.command.python.viewOutput.title": "显示输出",
Expand Down Expand Up @@ -54,7 +53,6 @@
"Interpreters.entireWorkspace": "完整工作区",
"Interpreters.pythonInterpreterPath": "Python 解释器路径: {0}",
"Interpreters.LoadingInterpreters": "正在加载 Python 解释器",
"Interpreters.unsafeInterpreterMessage": "此工作区中有一个 Python 环境,是否启用它来激活扩展中的功能?请在信任此环境时启用。",
"Interpreters.condaInheritEnvMessage": "您正在使用 conda 环境,如果您在集成终端中遇到相关问题,建议您允许 Python 扩展将用户设置中的 \"terminal.integrated.inheritEnv\" 改为 false。",
"Logging.CurrentWorkingDirectory": "cwd:",
"InterpreterQuickPickList.quickPickListPlaceholder": "当前: {0}",
Expand Down Expand Up @@ -108,7 +106,6 @@
"Installer.searchForHelp": "搜索帮助",
"Installer.couldNotInstallLibrary": "无法安装 {0} 。如果 pip 不可用,请使用选择的包管理器手动将此库安装到您的 Python 环境中。",
"Installer.dataScienceInstallPrompt": "数据科学库 {0} 未安装,是否安装?",
"diagnostics.removedPythonPathFromSettings": "已在 settings.json 文件中删除了 \"python.pythonPath\" ,因为 Python 扩展不再使用该设置。您可以在 Python 输出中获取所选解释器的路径。[了解更多](https://aka.ms/AA7jfor).",
"diagnostics.warnSourceMaps": "已启用 Source Map 支持,这会影响 Python 扩展的性能。",
"diagnostics.disableSourceMaps": "禁用 Source Map 支持",
"diagnostics.warnBeforeEnablingSourceMaps": "启用 Source Map 支持将影响 Python 扩展的性能。",
Expand Down
32 changes: 0 additions & 32 deletions pythonFiles/pyvsc-run-isolated.py

This file was deleted.

Loading