Skip to content

Support ms-python.vscode-python-envs for Python environment discovery#39

Open
dv-ar wants to merge 1 commit intocaenrigen:mainfrom
dv-ar:feature/new-python-envs
Open

Support ms-python.vscode-python-envs for Python environment discovery#39
dv-ar wants to merge 1 commit intocaenrigen:mainfrom
dv-ar:feature/new-python-envs

Conversation

@dv-ar
Copy link
Copy Markdown

@dv-ar dv-ar commented Mar 24, 2026

Summary

  • Adds support for the Python Environments extension (ms-python.vscode-python-envs) as a Python discovery source, tried before ms-python.python
  • Prefers the active workspace environment, falls back to the global active environment, then includes all other discovered environments
  • Skips broken environments (those with an error field) before spawning subprocesses
  • Subscribes to onDidChangeEnvironment and onDidChangeEnvironments with a shared 500 ms debounce to re-validate Jupytext when the active environment changes
  • Updates README and pythonExecutable setting description to document all three discovery sources in priority order
  • Bumps version to 1.4.5

Test plan

  • With ms-python.vscode-python-envs installed: Output → Jupytext Sync shows ms-python.vscode-python-envs: resolved N candidate path(s): ...
  • With only ms-python.python installed: fallback works as before
  • With neither extension installed: python/python3 PATH fallback works
  • Change active Python environment in the Python Environments UI → Jupytext re-validates automatically
  • Broken environments (with error field) are skipped and not probed

🤖 Generated with Claude Code

Adds support for the Python Environments extension (ms-python.vscode-python-envs)
as a Python discovery source, tried before ms-python.python. Prefers the active
workspace environment, falls back to global active environment, then all other
discovered environments. Broken environments are skipped. Subscribes to environment
change events with a 500ms debounce to re-validate Jupytext automatically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@caenrigen
Copy link
Copy Markdown
Owner

Please elaborate first on the problem(s) this PR is intended to solve.

I am currently using Jupytext from a virtualenv and it works. What are the scenarios that don't work for you?

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.

2 participants