astral-sh / rye

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

rye list: Never modify or delete the virtualenv #1351

Closed bluss closed 3 weeks ago

bluss commented 1 month ago

Previously, in some situations, rye pin <pythonversion>; rye list could lead to rye deleting the existing virtualenv.

I suggest that rye list should be an interrogator and never modify any project. With this change, it lists its own and non-rye virtualenvs (same behaviour as uv pip freeze) but should never create, recreate or overwrite environments (own or non-rye).

Fixes #1352

bluss commented 1 month ago

Making draft while figuring out some questions in #940.

Edit: Now seems to be solved, the added test here fails before the fix and passes now.