-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Present a warning if user attempts to install a non-existant extra option #2138
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
Comments
The more I think about this, the more this seems related to setuptools some how passing an argument on to pip and not pip itself. |
pip can install things from Wheels without any involvement of setuptools and it's well positioned to present user facing messages like that anyways. |
Sorry for the early closure - I didn't think about Wheels. Thanks for reopening! |
It looks like an error is already thrown from line 2409 in pip/_vendor/pkg_resources.py. It seems like this provides the type of error I was looking for.
|
I also don't remember this being thrown when I was testing on my own, but maybe my memory is failing me. |
dstufft and I discussed this on IRC a bit more. Currently, if a non existent option is passed in and a single exception is thrown, This means if a user has a list of options like
where tls actually exists; because of zorro failing, the tls option will not be installed. The implementation of this error should allow for a message to be logged for each of the missing options, ideally the options that cannot be installed will be displayed in a single warning. Options that are installable should be allowed to proceed. E.g., Let's say twisted only has a TLS option. Bob, a user, tries to
Bob will see the following
|
Closed by #2142 |
Using setuptools' extra_requires option, a user might try to install an option that doesn't exist.
An example being:
Since the zorro option doesn't actually exist in Twisted, pip will just install twisted and then try to install the zorro option. The install will succeed without the user knowing that zorro had no effect on the install.
In speaking with dstufft, it seems like it would be best if pip presented a colorized warning (if the terminal supports it) stating that the requested option doesn't exist.
It also looks like this could be achieved using something like
The text was updated successfully, but these errors were encountered: