microsoft / microsoft/vscode-python-environments
Python Extension and Python Environment Extension both activate when `python.useEnvironmentsExtension` defaults to false
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 138
- Forks
- 62
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 35
Description
## 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Python Environment Extension’s configuration inspection and activation logic, then compare it with the Python Extension’s default-aware get behavior and the Command Palette when condition. Reproduce with both extensions installed and experiments disabled; done means the extensions agree on environment ownership and only the expected selector is shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100