-
Notifications
You must be signed in to change notification settings - Fork 615
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
(🎁) Fail and show an error when an invalid extra is requested #2828
Comments
We show these warnings on compile:
(I don't think we should fail, but we should warn.) |
i think it should be an error for the same reason attempting to install a package that doesn't exist is an error. i spent hours the other day trying to figure out why an extra from a package i was using wasn't working, only to find out that it wasn't even installed because i specified the wrong name. warnings are very easy to miss i can't think of a case where you'd ever want to specify an invalid extra, but if there is, i guess there could be an option to warn instead of fail. but i think it should fail by default |
I'm undecided but prior art from pip to understand why pip warns (but doesn't error):
|
For reference, pip itself just warns
|
I think part of the problem is that "whether an extra exists" can change over time, since extras can be added or removed. Should we backtrack to versions that do include an extra? If not, |
I added the warning for |
I think erroring is reasonable, we just need to consider the implications, because it would be a divergence from pip and so could break some workflows. |
Based on the threads you linked, it seems the only legitimate middle ground I see to avoid potential issue with transitives with invalid extras is pypa/pip#9736 (comment) where you'd enforce extras exists when supplied directly by the user, but don't enforce them when resolving them on transitives. |
## Summary These are shown in `pip compile`, but absent from `pip install`. See: #2828.
@charliermarsh Next can you do a reimplementation of python itself, all your projects make sound, well-thought out decisions that fix so many long standing issues with the ecosystem. |
To add some color to this discussion, I'm working on a build/test system that aims to move a lot of the project configuration into tooling and infrastructure. It assumes that every project under test is going to declare any test dependencies under the Some projects, however, will have no project-specific test dependencies. In this case, the project gets built without any If you have any concerns about that approach, please comment in coherent-oss/coherent.test#5. |
I have a setup where those extras are defined in setup.py but when running
and also doesn't install any dependencies other then the package itself, not even the things in This is the case since v0.2.5, it works fine in 0.2.4. Let me know if this is the right thread for this message or wether I should file a new issue. |
@karfau That looks like a regression, please file a new issue with details how to reproduce your case! |
The imposter here should have been reported and caused the installation to fail
The text was updated successfully, but these errors were encountered: