You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Divergence from pip-compile when using --upgrade and --upgrade-package #18225
Hi folks! Been slowly migrating to use uv's pip-compile compatibility and stumbled across a divergence in behavior when passing both --upgrade (upgrade all packages) and --upgrade-package={pkg}{constraint} (upgrade package {pkg}, subject to {constraint}).
jazzband's pip-compile currently does it's best to respect the intention of both flags -- it considers the additional constraint and maximizes packages upgrades while still satisfying the constraint. It appears that uv simply ignores any additional constraints when alongside --upgrade.
$ docker build -f ./Dockerfile . --progress=plain --no-cache...#8 6.363 requests version with pip-compile:#8 6.364 requests==2.29.0...#9 1.755 requests version with uv pip compile:#9 1.756 requests==2.32.5
I was curious, so I peeked through the code and found this TODO that seems pertinent.
From my understanding, we DO want uv's pip-compile to be a drop in replacement, so I think it fair to consider this a bug worth fixing! I've been working on a patch that should handle this case (as well as a few related situations with --no-upgrade etc).. I'll link to that from here, if that's ok!
Platform
Ubuntu 24.04 (x84_64), though think this is OS, architecture independent
Activity
fix(pip-compile): respect constraints during `--upgrade` (#18226)