Commit 09cb321
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>1 parent 7a06e93 commit 09cb321
4 files changed
Lines changed: 15 additions & 12 deletions
File tree
- .github/workflows
- src
- client/pythonEnvironments/base/locators/common
- test/pythonEnvironments
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| 329 | + | |
329 | 330 | | |
330 | | - | |
| 331 | + | |
331 | 332 | | |
332 | | - | |
| 333 | + | |
333 | 334 | | |
334 | 335 | | |
335 | 336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
| 307 | + | |
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| 322 | + | |
322 | 323 | | |
323 | | - | |
| 324 | + | |
324 | 325 | | |
325 | | - | |
| 326 | + | |
326 | 327 | | |
327 | 328 | | |
328 | 329 | | |
| |||
584 | 585 | | |
585 | 586 | | |
586 | 587 | | |
587 | | - | |
| 588 | + | |
588 | 589 | | |
589 | 590 | | |
590 | 591 | | |
| |||
598 | 599 | | |
599 | 600 | | |
600 | 601 | | |
| 602 | + | |
601 | 603 | | |
602 | | - | |
| 604 | + | |
603 | 605 | | |
604 | | - | |
| 606 | + | |
605 | 607 | | |
606 | 608 | | |
607 | 609 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | 123 | | |
125 | 124 | | |
126 | 125 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
0 commit comments