microsoft / microsoft/vscode-python-environments
Python Extension and Python Environment Extension both activate when `python.useEnvironmentsExtension` defaults to false
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 138
- 派生
- 62
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 35
描述
## Environment data
## Repro Steps
* Install the Python extension
* Install the Python environment extension
* Set the user configuration to:
```json
"workbench.enableExperiments": false,
"python.experiments.enabled": false
```
Reload the window
## Expected behavior
* The Python and Python environment extension agree on which extension is responsible for managing environments
## Actual behavior
* Both extensions activate
* I see two Python selectors
* The `Select Python Environment` selector from the Python Environment extension is missing
## Additional context
The Python Environment Extension uses `inspect` to decide whether `useEnvironmentsExtension` is set to false, but this does not take into account a default value.
The `when` condition of the Command Palette entry uses `when`, which takes default values into account
The Python Extension uses `get`, which takes default values into account
This came up in https://github.com/astral-sh/ty-vscode/issues/551 because it's now unclear which extension ty should consider as being authoritative when it comes to selecting an environment.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
先定位 Python Environment Extension 的配置检查和激活逻辑,然后将其与 Python Extension 考虑默认值的 get 行为以及 Command Palette 的 when condition 进行比较。在安装了两个扩展且禁用实验功能的情况下重现;当扩展在环境归属上达成一致,并且只显示预期的选择器时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python, typescript, vscode
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 68/100