-
Notifications
You must be signed in to change notification settings - Fork 254
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 a function to provide a "human readable" form of a specifier #312
Comments
Through PEP 440 we come across Arbitrary equality and it mentions:
Some questions:
It will be helpful to understand how pip treats this operator so we can try and give a useful error message to the user if they have used this operator. |
I imagine pip would do whatever packaging supports. I'm not at a PC where I can do this right now, but can't you just check by doing something like |
This came to my attention via this Zulip conversation. Pradyun asked for more details on why we are considering doing this -- what the benefit is. And Paul mentioned
@nlhkabu gave an example in pypa/pip#8220 (comment) :
I know that very experienced packaging experts, and some programmers, think that the one on the left is more readable. I am a programmer and more expert in Python packaging than many people. But when I look at those examples, the more symbol-heavy example on the left makes me feel a bit of despair, like, "Oh no, now I have to work out what that means." The version on the right makes me feel calm and like a person is talking to me and will help me solve my problem. @pradyunsg does that help you understand one benefit of this (possible) approach? |
Thanks @brainwane! I do understand that the symbol heavy nature of the notation isn't super great for anyone who isn't familiar with them / doesn't deal with them regularly, and how a more "plain English" format would be nice to have. However, I think it represents a not-insignificant amount of both design and implementation time, to implement this. I have some concerns about how such information presented to non-English users would look like, and whether packaging is the correct place to put the logic for this "plain English" representation. I don't think I can judge the feasibility of implementation of such a function, and whether packaging is the right place to put it, right now. I'll wait till someone posts a more concrete proposal here, containing details of what this looks like, and how the message would be constructed. |
I don't think 'packaging' is the right place for this. This is very much a UI/UX thing and this project doesn't provide support at that level. |
I should note that I'm also not sure packaging is the right home for this. I used packaging purely as a placeholder for "not pip", as I definitely don't think this should be internal to pip. The problem is that if this doesn't go in packaging, the most obvious alternative place is a new, dedicated library. And that has a whole extra bunch of costs to set up that push the cost/benefit case even further towards "not worth it" 🙁 |
See pypa/pip#8220 for background.
Could a function be added that would return a "human readable" form of a
SpecifierSet
?The text was updated successfully, but these errors were encountered: