Skip to content

Python Extension and Python Environment Extension both activate when python.useEnvironmentsExtension defaults to false #1778

Description

Environment data

Repro Steps

  • Install the Python extension
  • Install the Python environment extension
  • Set the user configuration to:
    "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
Image

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 astral-sh/ty-vscode#551 because it's now unclear which extension ty should consider as being authoritative when it comes to selecting an environment.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions