Skip to content

Make environmentPath consistently reference the Python executable - #1805

Draft
Eduardo Villalpando Mello (edvilme) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-environmentpath-return-value
Draft

Eduardo Villalpando Mello (edvilme) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-environmentpath-return-value

Conversation

Copilot AI commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

PythonEnvironmentInfo.environmentPath could reference either an environment directory or its Python executable, forcing consumers to handle manager-specific semantics. This change defines and returns the executable URI consistently.

Changes

  • Environment discovery

    • Use discovered executable paths for Conda, Pipenv, Poetry, pyenv, and venv environments.
    • Ignore malformed Conda records without a prefix.
    • Preserve legacy Pipenv selections stored as environment prefixes.
  • Prefix-dependent operations

    • Use sysPrefix for Conda package management, deletion, .gitignore creation, and CONDA_PREFIX comparisons.
    • Use sysPrefix when removing virtual environments.
  • Public API

    • Clarify that environmentPath identifies the Python executable.
    • Update API package version and changelog.
environmentPath: Uri.file(info.executable),
sysPrefix: info.prefix,

Copilot AI and others added 2 commits September 23, 2026 20:45
Co-authored-by: edvilme <5952839+edvilme@users.noreply.github.com>
Co-authored-by: edvilme <5952839+edvilme@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix environmentPath to consistently return executable path Make environmentPath consistently reference the Python executable Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

environmentPath should always return the path to the executable

2 participants