Skip to content
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

Add ids (and classes?) to logged messages, to simplify filtering (and explaining?) #6119

Open
pradyunsg opened this issue Jan 8, 2019 · 3 comments
Labels
type: feature request Request for a new feature UX User experience related

Comments

@pradyunsg
Copy link
Member

pradyunsg commented Jan 8, 2019

What's the problem this feature will solve?
pip is slowly getting more and more "no-warn" flags for various error messages that the user might want to silence and there are existing messages that do not have any way to silence them. It would be a good idea to simplify pip's CLI by coming up with a scalable solution to this and removing those flags.

Describe the solution you'd like
Associate string(s?) with logged messages and provide a CLI flag to allow filtering / disabling messages like --ignore-messages script-location,ssl (whatever name we land on).

Expanding on that idea, inspired by rustc --explain <code>, we could even extend that to provide explanations along with pip's error messages that can possibly go on to discuss why things are the way they are and possibly suggestions on how to fix them. This could take the form of pip help --explain <code> (I like this interface but it changes what pip help does; we can colour the bike shed later).

Alternative Solutions
None that I have explored personally.

Additional context
@cjerdonek came up with this idea and mentioned this somewhere in this issue tracker -- I can't find it now.

@pradyunsg pradyunsg added the type: feature request Request for a new feature label Jan 8, 2019
@pradyunsg pradyunsg added this to the Improve User Experience milestone Jan 8, 2019
@cjerdonek
Copy link
Member

@cjerdonek came up with this idea and mentioned this somewhere in this issue tracker -- I can't find it now.

Thanks, @pradyunsg. That was here on an issue to add support for suppressing "Requirement already satisfied" messages: #5900 (comment)

@pradyunsg pradyunsg changed the title Add ids (and classes?) to warnings/errors, to simplify filtering (and explaining?) Add ids (and classes?) to logged messages, to simplify filtering (and explaining?) Jan 8, 2019
@pradyunsg
Copy link
Member Author

Thanks for finding that @cjerdonek! :)

Broadened scope in OP, to include all messages logged.

@bitti
Copy link

bitti commented Sep 21, 2021

What's the proposed solution here? If it's still under discussion I'd suggest this: pytest has a filterwarnings config option, so why not do the same for pip people add some pip options into the setup.cfg. E.g.:

[pip]
filterwarnings =
    ignore:Requirement already satisfied

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request Request for a new feature UX User experience related
Projects
None yet
Development

No branches or pull requests

4 participants