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

pip install should crash when an invalid extra/optional dependency is specified #12516

Closed
1 task done
boyleconnor opened this issue Feb 7, 2024 · 2 comments
Closed
1 task done
Labels
S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature

Comments

@boyleconnor
Copy link

boyleconnor commented Feb 7, 2024

What's the problem this feature will solve?

Pip users can sometimes accidentally mistype the name of an extra/optional dependency (e.g. pip install evaluate[evaluater] instead of pip install evaluate[evaluator]). This currently will lead to the desired extra dependency not being installed, and pip will give a warning to stderr (evaluate 0.4.2.dev0 does not provide the extra 'evaluater') but otherwise continue as normal (including producing a return code of 0).

This can lead to users not noticing that a dependency was not installed.

Describe the solution you'd like

Pip should crash when a user specifies a non-existent extra dependency, just as would be the case with a non-existent top-level package.

Alternative Solutions

I don't believe this section is applicable

Additional context

n/A

Code of Conduct

@boyleconnor boyleconnor added S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature labels Feb 7, 2024
@notatallshaw
Copy link
Member

Duplicate of #9736, also similar to #11913 and #7122

I strongly agree, the real world use for extras does not match the wording of the specification and this should be updated. But probably going to have to discuss that with wider packaging community (discuss.python.org) not directly with Pip to get Pip to change it.

@boyleconnor
Copy link
Author

Apologies for missing the duplicate. I'll close this issue so all discussion can be concentrated at #9736 or whatever broader Python community discussion this leads to.

@boyleconnor boyleconnor closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

2 participants