Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bluss opened this issue Aug 25, 2024 · 0 comments · Fixed by #1351
Closed

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

bluss opened this issue Aug 25, 2024 · 0 comments · Fixed by #1351

Comments

@bluss
Copy link
Contributor

bluss commented Aug 25, 2024

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 (bf3ccf8 2024-08-21)
platform: linux (x86_64)
self-python: cpython@3.12.4
symlink support: true
uv enabled: true

Stacktrace

No response

@bluss bluss changed the title rye list overwrites (managed) venv rye list overwrites (managed) venv if python version does not match Aug 25, 2024
charliermarsh pushed a commit that referenced this issue Sep 3, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant