-
Notifications
You must be signed in to change notification settings - Fork 502
Description
Describe the bug
When uninjecting a package, pipx by default also uninstalls the dependencies of the uninjected package, unless the --leave-deps option is used.
This can break dependencies for remaining packages in the venv, which could have dependencies in common with the uninjected package.
I experienced this on a venv in which a package with some "extras" was installed, as in pipx install package[extra1,extra2]. When uninjecting the packages needed for extra2, some dependencies in common with extra1 were uninstalled too, breaking its functionality.
Expected behavior
First best would be to have uninject to check if any dependency planned to be uninstalled is also a dependency for other packages in the venv, and don't uninstall it if that's the case.
If that is not possible, I think that --leave-deps should be the default behaviour with uninject, and there should be a --uninstall-deps (or --include-deps?) option to force the current default behaviour (after warning the user about potentially dangerous effects).