-
Notifications
You must be signed in to change notification settings - Fork 793
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
uv pip compile
does not include extras in output
#1595
Comments
Are there benefits to including the extra? (Asking genuinely, I thought it was fine to omit since it shouldn’t affect installation given that everything is flattened.) |
Debatable. So, in terms of "does this change what gets installed or the actual behaviour of packages", I don't think so. AFAIK packages don't have access to what extras they were installed only, and the only thing they see is "is package X in my extras installed". In terms of "dev readability/trust", a little bit. If I told a package requirements system like There's an interesting pip-tools issue (jazzband/pip-tools#1613) talking about whether to remove this or not, and that flags a fun case with GDAL doing things depending on the order of installation (jazzband/pip-tools#1608 (comment)) |
I personally use In lieu of filing a separate issue, I'll point out on this one that I'd say that if |
uv pip compile
does not include extras in output
My 2c: This should certainly not be the default, pip-compile is doing the right thing by changing its default to |
I'm not too fussed (especially given the possible change in |
One datapoint from me: |
It's probably not too bad to add opt-in support for this. I will take a look. |
## Summary We strip extras by default, but there are some valid use-cases in which they're required (see the linked issue). This PR doesn't change our default, but it does add `--no-strip-extras`, which lets users preserve extras in the output requirements. Closes #1595.
Thanks @charliermarsh I just used this functionality |
If for example you run
echo "celery[redis]" | uv pip compile -
then theredis
extra is correctly picked up and the extra requirements added to the output. However, the output will contain something likecelery==5.3.6
, notcelery[redis]==5.3.6
and pip-compile does the latter.uv: 0.1.3
The text was updated successfully, but these errors were encountered: