astral-sh / rye

a Hassle-Free Python Experience
https://rye.astral.sh
MIT License
13.6k stars 466 forks source link

rye list overwrites (managed) venv if python version does not match #1352

Closed bluss closed 3 weeks ago

bluss commented 1 month ago

Steps to Reproduce

In this case, rye list overwrites the venv. In this test case, the project is rye managed, but it's still surprising that rye list modifies the project.

  1. mkdir project; cd project; rye init -p 3.12; rye sync; rye pin 3.11.7; rye list; cd -

Using uv 0.3.3

Expected Result

rye list keeps the existing virtualenv

Actual Result

rye list overwrites .venv with a new empty venv.

We have tool.rye.managed=true but are still surprised that rye list was destructive.

Version Info

rye 0.39.0 commit: 0.39.0 (bf3ccf818 2024-08-21) platform: linux (x86_64) self-python: cpython@3.12.4 symlink support: true uv enabled: true

Stacktrace

No response