-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
drops mention of extras, totally losing dependency annotations via constraints
#4256
Comments
You can pass |
This shouldn't matter though -- extras just add additional dependencies, and they're all written out in the output requirements anyway. I believe pip-compile plans to make this the default too in the next release. |
Firstly, thanks for the very quick response!
OK, so another unexpected difference from
Whilst I recognise it makes no difference to the packages that eventually get installed, it matters because I, the developer, lose the information that helps me track dependencies. Otherwise, why emit those comments in the first place? |
Ah, I see, you want |
(I thought you were referring to the emitted dependency.) |
Or am I again misinterpreting? Because |
No, to clarify I want my Adding |
Ahh, ok, I see. Glad it's working! And sorry for the confusion. |
If one doesn't exist already, I might contribute a docs update to include some tips on differences when moving from |
Amazing, I was experimenting the same kind of confusion at the exact same time as @funkybob, as I was installing That said, I noticed something that should probably be addressed: If I install an extra that does not exist ("blah", here), pip warns about it:
But uv says nothing about it:
|
Ah, should I open a separate ticket about how I should have spotted this when I had to add it to the |
You can add |
@dperetti -- We do emit it on install:
But not when the package is already installed. |
So many changes in behavior :/ Perhaps a "--pip-tools-compat" flag is warranted? |
It seems like this won't be a difference for very long, if I don't specify
|
Indeed, however it's a loud difference with a clear deprecation path and timeline. I'm slowly discovering all the quiet differences between uv and pip-tools. |
For those playing along at home, this does work, but it also emits |
I appreciate where you're coming from but I consider these to be fairly minimal differences. We have different defaults for the |
Not arguing the validity of the choices. It's more that since this is pitched as a Or have a flag to do that. I will make time this afternoon to formulate a patch for the docs. |
Sorry to hear you've been having a hard time transitioning. We've tried to avoid implementing deprecated behavior in both |
Closed by #4302. Thanks! |
Using : uv-0.2.10-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Environment:
python:3.11-slim
docker containerI recently switched from
pip-compile
touv
and am generally pleased, however today I noticed (after discovering it doesn't write the output by default) that when a package requirement has extras, these aren't written out.e.g.
django-storages[s3]
is written out as simplydjango-storages
At the first level, this has no direct impact; All the requirements are still commented as being required by this package:
Howerver, my
-dev.in
file which has a-c
constraint on the mainrequirements.txt
no longer carries over these comments, as it can no longer see the information -- therequirements.txt
doesn't havedjango-storages[s3]
, onlydjango-storages
The text was updated successfully, but these errors were encountered: