You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a virtual project using rye init --virtual virtual_project.
Go into the virtual project directory with cd virtual_project.
Run sync using rye sync.
Add any dependency using rye add. For example, rye add aiohttp.
Remove the installed dependency with rye remove aiohttp.
Run rye list to list installed dependencies.
Expected Result
The command rye list shouldn't display anything since we remove the only dependency. And no dependency should be listed in pyproject.toml, requirements.lock and requirements-dev.lock.
Actual Result
There is no dependency listed in pyproject.toml, requirements.lock and requirements-dev.lock. However, the command rye list still shows the dependencies of the removed package.
What's more, if you try to add other package now, you will find that rye shows the record of removing the dependencies of the previously removed packages. This means that rye didn't remove them but kept them in the virtual environment until the new package is added.
I personally guess it might be an upstream problem from uv when dealing with empty dependencies as it shows the following warning when I remove the last dependency. And such a warning also appears when you first did rye sync on the virtual project.
warning: Requirements file requirements-dev.lock does not contain any dependencies
No requirements found (hint: use `--allow-empty-requirements` to clear the environment)
Steps to Reproduce
rye init --virtual virtual_project
.cd virtual_project
.rye sync
.rye add
. For example,rye add aiohttp
.rye remove aiohttp
.rye list
to list installed dependencies.Expected Result
The command
rye list
shouldn't display anything since we remove the only dependency. And no dependency should be listed inpyproject.toml
,requirements.lock
andrequirements-dev.lock
.Actual Result
There is no dependency listed in
pyproject.toml
,requirements.lock
andrequirements-dev.lock
. However, the commandrye list
still shows the dependencies of the removed package.What's more, if you try to add other package now, you will find that rye shows the record of removing the dependencies of the previously removed packages. This means that rye didn't remove them but kept them in the virtual environment until the new package is added.
I personally guess it might be an upstream problem from
uv
when dealing with empty dependencies as it shows the following warning when I remove the last dependency. And such a warning also appears when you first didrye sync
on the virtual project.Version Info
rye 0.39.0
commit: 0.39.0 (bf3ccf8 2024-08-21)
platform: linux (x86_64)
self-python: [email protected]
symlink support: true
uv enabled: true
Stacktrace
No response
The text was updated successfully, but these errors were encountered: