-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Feature request: ignore extras in constraints files, don't reject them #9209
Comments
We're running into a similar problem. |
`pip >= 20.3` is using a new resolver that no longer accepts extras in constraints files. In the `install-dev` task we used to pass our requirements-dev.txt file verbatim as a constraints file to ensure additional local developer tools (via `requirerments-local.txt`) don't cause breakage. For now pre-process the requirements file with sed to remove extras. See: pypa/pip#9209
`pip >= 20.3` is using a new resolver that no longer accepts extras in constraints files. In the `install-dev` task we used to pass our requirements-dev.txt file verbatim as a constraints file to ensure additional local developer tools (via `requirerments-local.txt`) don't cause breakage. For now pre-process the requirements file with sed to remove extras. See: pypa/pip#9209
`pip >= 20.3` is using a new resolver that no longer accepts extras in constraints files. In the `install-dev` task we used to pass our requirements-dev.txt file verbatim as a constraints file to ensure additional local developer tools (via `requirerments-local.txt`) don't cause breakage. For now pre-process the requirements file with sed to remove extras. See: pypa/pip#9209
What's the problem this feature will solve?
We have some CI pipelines that use the full locked set of project dependencies as a constraints file when installing a subset of the dependencies.
Rejecting extras in constraints files means that we can't do this with the new resolver, we have to pre-process the locked requirements file to remove all the extras declarations.
Describe the solution you'd like
Silently ignore extras in constraints files, don't fail the command.
Alternative Solutions
The workaround is to run
sed -i 's/\[[^]]*\]//g' constraints.txt
to pre-process a copy of the project requirements file to remove all the extras declarations, rather than using the requirements file directly.Additional context
#6628 was an issue with the old resolver where extras declarations in constraints files were incorrectly interpreted as requesting that those extras be installed. This is not a request to bring back that behaviour - instead, it's a request to process constraints files as if they didn't contain any extras declarations, regardless of whether they do or not.
The text was updated successfully, but these errors were encountered: