Use configured env for activation command#10916
Conversation
22bda55 to
51ed260
Compare
|
Rebased this branch on current Verified:
|
51ed260 to
42b9962
Compare
|
Rebased again on current Verified locally:
|
94d2305 to
378e64e
Compare
|
Rebased onto current New head: Verified locally:
|
|
Checked the fresh CI after the rebase. The only red job is That test is outside this PR's diff ( |
378e64e to
c579549
Compare
|
Rebased onto current New head: Verified locally:
|
|
Fresh checks on |
Resolves: #10423
env activatenow uses the environment selected during command setup instead of resolving a fresh environment. This preserves the compatible virtualenv chosen when the active Python does not satisfy the project constraint, and avoids looking at the incompatible activeVIRTUAL_ENVagain.Tests:
./.bootstrap-venv/bin/python -m pytest tests/console/commands/env/test_activate.py -qUV_CACHE_DIR=$PWD/.uv-cache uvx ruff==0.15.12 check src/poetry/console/commands/env/activate.py tests/console/commands/env/test_activate.pyUV_CACHE_DIR=$PWD/.uv-cache uvx ruff==0.15.12 format --check src/poetry/console/commands/env/activate.py tests/console/commands/env/test_activate.pygit diff --check