-
Notifications
You must be signed in to change notification settings - Fork 445
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
pipx upgrade fails when package is not installed #1262
Comments
It would appear that a long form of |
Hi @jorhett, thanks for raising this. From a quick investigation I can see that the code leading to this behavior has not been changed in the last 4 years. Do you have a rough idea in what version of
I can see how the wording here is imprecise. The code indeed runs I you can help pointing me to a version of pipx since 1.0 where this was not the case I'm happy to mark this as a bug. Otherwise, I'd suggest treating it as a feature request. |
I don't know what version. All I know is that an Ansible role I'd created to install and update packages is now failing, and looking at previous test history it succeeded with the
It seems a bit disingenuous to say that "not doing what the documentation says" is a feature request, no? Whether you consider it a bug or a feature, it's definitely needed since there is no machine-parseable way to test to see if pipx has already installed the package. |
I would say something like |
I can have a look at implementation details, if you all agree. |
Gotcha. Maybe my suggestion at the very bottom can help you quick fix your pipeline.
It's splitting hair, but as I mentioned, it does do what the documentation says, but it first checks if the package is already installed.
There is |
|
This was rejected by @uranusjr and @gaborbernat in the past, but maybe they find this reasoning strong enough to unblock the feature.
That infrastructure could be added without much effort, as far as I can tell. |
Yes I don't think it's hard to add, just that it's potentially confusing to be there. the argument would only be relevant in combination with the |
The Python interpreter issue goes both ways. If an application is already installed, what should |
While that would make the |
Fair enough, let's go for |
That does not by itself confirm that a package is installed. You also need to compare that list. Likewise deep into the details, but hard to use in configuration management systems aiming for idempotence. On the matter of which argument to support, it seems that aligning with pip would be cleaner on the user experience. However this point is relevant:
If this makes it easier to implement, 👍 |
Describe the bug
The documentation at https://pipx.pypa.io/stable/docs/#pipx-upgrade says that
upgrade
is:pipx upgrade
fails when a package is not installed, so that is not the behavior.How to reproduce
It should have installed it if not installed, and upgraded it if installed.
The text was updated successfully, but these errors were encountered: