-
Notifications
You must be signed in to change notification settings - Fork 433
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
Update injected packages. #79
Comments
Blindly updating dependencies can be problematic. You need to know that the main package is compatible with the newer version. If strict semver could be assumed, then maybe updating of minor versions and patches could be justified, but it cannot. In the past
That being said, i have not really tested it. Hopefully, in a not so far away future, every python package will be using pipenv/poetry to define their dependencies and pipx will be able to install the specific set of dependencies that the main package's developers chose/approved. Until then, if |
I'd like to point out that the injected packages are not necessarily dependencies of the "main" package. (Consider the example from README, we inject In my opinion, if we |
Agreed with @taketwo that the whole point of injecting dependencies is to add a new package that is NOT depended on by the package that was installed by pipx (the requests/ptpython example is apt here). This introduces a challenge to pipx to basically inspect I think a good middleground might be to do something like this.
1 month later user wants to upgrade an injected package and requests has a newer version published
This is fairly manual, especially if many packages were injected. But like @pmav99 said it's just a virtual env, so if the user wants to do something more elaborate they can
Below is something else I would be open to implementing if there is interest to make running
so you could do things like
To summarize
|
How about |
Since all injected packages are installed through pipx anyway, perhaps it could store the list of injected packages explicitly, and use that to determine what is not an automatically installed dependency. |
@cs01 I think that the Contrast with the manual workflow you just proposed. After the upgrade of the "main" packages the user needs to invoke a (fairly convoluted) upgrade command for each injected package separately. It's already rather awkward, leave alone actually remembering what is injected where ( I think an idea of keeping around a list of injected packages is worth exploring. Having such a list would allow to improve UX for multiple pipx commands:
|
I think that this is ultimately a question of what type of app pipx wants to be. If pipx is about installing python packages on a separate virtualenv environment while also adding the binaries to My main concern is that upgrading packages is not straight forward. If you want to keep everything working, you will ultimately have to resolve dependencies which is a seriously non trivial problem and is certainly out of scope. In the end, I think that having a That being said:
|
@pmav99 IMHO it's not about managing virtualenvs, the fact that we use virtualenvs to isolate the requirements or plugins for a given binary is incidental. But (I think) you need to have some mechanism for being able to update injected packages. I can think of at least one tool I use daily (mercurial) that sometimes has a new version that breaks the functionality of plugins I have installed - being able to Having said that, then yes, a Likewise, blindly updating injected packages is also a road to ruin: less so in the case of plugins, but more in the case of "optional" dependencies. Perhaps some mechanism for listing injected packages, and the installed+new version numbers? Some way of then marking which ones should be updated (and perhaps a way of rolling back to the previously installed version number)? (I'm just spitballing ideas now though). |
Just sharing my 2 cents.
|
I would personally love |
The runpip command has been added in 0.13. |
Now that we have metadata (#222), pipx knows the list of injected packages, and these could be upgraded during |
If we go that route, I would suggest we upgrade injected packages by adding a new |
Prepare update to API version 1.101
…validation Remove customer_id validation
As mentioned in #72, it's currently not possible to update dependencies/injected packages in pipx.
Should this be supported in some form? What form should this take?
pipx update <foo>
Should this update all injected packages and dependencies, or not?
The text was updated successfully, but these errors were encountered: