Tags: microsoft/vscode-python
Tags
release: Prevent virtualenv redirect from occupying .venv (#26168) ## Why Backport of [#26167](#26167) for the 2026.6 release branch. [virtualenv 21.12](https://github.com/pypa/virtualenv/releases/tag/21.12.0) began writing a `.venv` redirect file when creating `.virtualenv` in a project with `pyproject.toml`. The following `python -m venv .venv` then cannot create the separate stdlib venv directory, breaking the release branch's Windows and Linux venv jobs. ## Change Pass `--no-venv-redirect` when creating `.virtualenv` so the existing `.virtualenv` and `.venv` tests continue to use their original, separate paths. Exit immediately if stdlib venv creation fails. ## Windows unit-test investigation The Windows `ts-unit` job also intermittently failed on the first Native Python Finder refresh while the subsequent refresh succeeded. The locator-output diagnostic reproduced the failure: Pet logged `Skipping refresh state sync for stale generation 0 because current generation is 1` and returned no environments. The finder had launched a configure request in its constructor without awaiting it, while its first refresh launched another configure and could start before the first completed. Pet suppresses environment notifications from stale configuration generations. Remove the redundant constructor configure; the first refresh already configures and awaits completion before sending the refresh request. The existing non-empty assertion is unchanged and still includes the locator log on failure. The release branch's Build workflow must pass after this lands before releasing. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PreviousNext