-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[10.0.0beta] Installation emits extra warnings for unrelated packages #5196
Comments
Does this occur with 9.x, too? |
Hey @di! This is intentional - to cover a user with an already broken environment, by telling them that they have a broken dependency if the operation they perform doesn't fix it. I'm curious, is there some reason that you don't want to know that there's a broken dependency? @cjerdonek This is new behaviour in pip 10. #5000 |
@pradyunsg I guess I was just surprised by it since it's new. This warning made me think that something went wrong with the command I had run, when in fact I had just botched up my environment days ago, and was just seeing the results much later. Fine with me if this was planned all along and should be closed, I just think it's probably going to catch a lot of people off guard when they see it for the first time. |
I looked at the original PR, and doesn’t its news item suggest that only
errors about what’s being installed will now be printed?
pip install now prints an error message when it installs an incompatible
version of a dependency.
Otherwise, shouldn’t it say something like, “when it finds an error in the
dependencies in your environment”?
…On Tue, Apr 10, 2018 at 9:18 AM Dustin Ingram ***@***.***> wrote:
@pradyunsg <https://github.com/pradyunsg> I guess I was just surprised by
it since it's new. This warning made me think that something went wrong
with the command I had run, when in fact I had just botched up my
environment days ago, and was just seeing the results much later.
Fine with me if this was planned all along and should be closed, I just
think it's probably going to catch a lot of people off guard when they see
it for the first time.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5196 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAVt7r5ZN14seezKPwPoSiI6YBrVYkGkks5tnNs9gaJpZM4TNJZS>
.
|
Until this issue came up, I never really considered the possibility of unrelated incompatibilities being flagged when something was installed. I doubt it's a particularly common situation - once your environment has no broken dependencies, anything new that gets flagged will be because of what you've just installed - but I agree the message is a little surprising if it's reporting an existing issue. I don't think it's a major issue, personally - and in the long run we'll be getting a proper resolver which will avoid such broken dependencies in the first place - so I don't think it needs to be a release blocker. If someone wants to submit a PR fixing this for pip 10.1, I'd be fine with that. |
I will agree that my various environments are probably uncommon -- I usually have a few unmet or broken dependencies. 🙂 Even with a proper resolver, though, won't this still be possible to reproduce? In the example above, what would change? Would |
I've added an issue against the resolver project to consider how to handle that gracefully. You're right that people can have unmet or broken dependencies. My assumption is that when they do, it's because they didn't realise it, and they would fix it once informed. And in the context of a full resolver, pip itself would in effect make sure that once an environment is "good", it will stay that way But there's certainly a usability question over how Going back to the current situation, I guess a key question is - when you saw those warnings (not in your test case, but in your actual environment), were you motivated to fix them, or did you want to leave things as they were? And if the latter, was that because you didn't believe the warnings mattered ("I'm sure it will work anyway") or something else (I find it hard to think of another reason you'd want to leave your environment broken, apart from "I don't want to deal with this now" - but that's fine, you're motivated to fix them, but we're not forcing you to do so immediately). |
Well, I wasn't exactly in prod, so once I got past "Huh, why didn't that work" and "Wait, why does X even depend on Y?", I didn't care, but mostly because it was just a one-off environment that I was doing some testing in. If it had been a more important environment I might have cared, but usually I'm either a) not |
Thanks for the feedback - it's definitely something we should monitor in real use, so it's good to get people's reactions. (And personally, I'm not that convinced you're particularly atypical - I suspect my reaction would be similar). |
My 2 cents: I don’t think “pip install foo” should report errors about
dependencies not in foo’s dependency graph, unless perhaps it’s in a
verbose mode and pip needs to compute that information anyways. For
example, it could get annoying if you have a known issue with a dependency
in your environment, and you’re individually installing a number of things.
It could also serve to distract from any errors that _are_ a result of what
you’re installing.
…On Tue, Apr 10, 2018 at 12:46 PM Dustin Ingram ***@***.***> wrote:
Well, I wasn't exactly in prod, so once I got past "Huh, why didn't that
work" and "Wait, why does X even depend on Y?", I didn't care, but mostly
because it was just a one-off environment that I was doing some testing in.
If it had been a more important environment I might have cared, but
usually I'm either a) not pip installing willy nilly in said
environments, and b) not actually looking at the output of pip install
unless it has failed with an exit code. So I think this warning is either
going to confuse me unnecessarily or just never get noticed, but again, I
realize that I might not be the typical user.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5196 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAVt7ulc-sb-0khNOzL-LeHGuSegkTY8ks5tnQwLgaJpZM4TNJZS>
.
|
This comment has been minimized.
This comment has been minimized.
As another use-case, our project builds packages in a local virtualenv as part of the installation. During the build, users will get warnings about broken package dependencies in their pip environment, which is irrelevant to the local virtualenv build that is taking place and creates confusion as to whether the warnings are related to installing the software or not. I agree that these warnings are generally helpful, but it would be nice to have a way to suppress them for specific use-cases (I could not find a flag in the help output, if it already exists). |
There's a --no-warn-
<
something
>
flag I'd added for this in the same PR.
Would a separate option to specify packages to ignore (when they occurs as
dependencies) would be useful?
…On Wed, 18 Apr 2018, 22:14 Ben Albrecht, ***@***.***> wrote:
This is intentional - to cover a user with an already broken environment,
by telling them that they have a broken dependency if the operation they
perform doesn't fix it.
I'm curious, is there some reason that you don't want to know that there's
a broken dependency?
As another use-case, our project builds packages in a local virtualenv as
part of the installation. During the build, users will get warnings about
broken package dependencies in their pip environment, which is irrelevant
to the local virtualenv build that is taking place and creates confusion as
to whether the warnings are related to installing the software or not.
I agree that these warnings are generally helpful, but it would be nice to
have a way to suppress them for specific use-cases (I could not find an
existing flag, if it already exists).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5196 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADH7ScsXYLc2kHxx9xtthMgY9vtx0wBbks5tp211gaJpZM4TNJZS>
.
|
Personally I don't think so. This issue is more about avoiding initial confusion than dealing w/ an annoying warning. Being able to explicitly ignore warnings for some set of packages doesn't really help with that first case. |
So... Any actionable ideas here? |
For the use-case I described above, a flag for ignoring this warning altogether (rather than a package-specific warning) would suffice as a solution. |
We have |
I think one actionable idea is what @cjerdonek mentions here:
I'm not familiar enough with pip to be able to say how actionable that is, but I think that this would resolve the original issue, at least for me. |
@pradyunsg - I was not aware of this. This is acceptable for my specific use-case. Thanks! |
Indeed. I'll explore this avenue. |
It also brings up the warning for packages found by an egg info not yet installed. In particular it also warns about things required for setup (setup_required) and it warns for any system python 2.7 on mac because of global missing dependencies of matplotlib. |
Made a PR: #5457. If someone could take it for a spin and provide feedback, that'd be awesome. :) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
release/10.0.0
HEAD)3.6.4
Darwin 17.5.0 x86_64 i386
Description:
Running
pip install <package>
will emit warnings about missing dependencies for unrelated packages (essentially, the output ofpip check
). I would expect to see warnings only related to the package I'm attempting to install.This seems similar to some fixed issues (#5134, #5160, #5195) but still occurs after the fixes for those issues.
What I've run:
The actual packages used don't matter: when a package A has unmet dependency B, installing C (with no shared dependencies with A) will warn that B is missing.
The text was updated successfully, but these errors were encountered: