Files
uv/crates/uv-configuration
Connor McCarthy acccaf8913 fix(pip-compile): respect constraints during --upgrade (#18226)
## Summary

[`pip-compile`] (jazzband) has the following semantics when invoked with
both `--upgrade` and `--upgrade-package={pkg}{constraint}`: upgrade all
packages WHILE abiding by the constraints provided.

Currently, `uv` ignores the additional constraints, merging `--upgrade`
and `--upgrade-package` simply as `--upgrade`, which is obviously a
divergence in behavior. This leads to specific package constraints being
ignored, even when explicitly provided. When I went to look at patching
this, I noticed an open TODO around the same behavior in the
`--no-upgrade` case.

As a solution, separate the `UpgradeStrategy` from the constraints
provided, allowing for a more graceful merge.

[`pip-compile`]: https://github.com/jazzband/pip-tools

I've created an issue to track this here:
https://github.com/astral-sh/uv/issues/18225

## Test Plan

I've added a few integration tests to cover this case (including
updating the negative test that existed), and updated the relevant
snapshots.

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2026-03-02 08:40:48 -06:00
..
2026-02-27 07:07:47 -05:00
2026-02-27 07:07:47 -05:00

uv-configuration

This crate is an internal component of uv. The Rust API exposed here is unstable and will have frequent breaking changes.

This version (0.0.27) is a component of uv 0.10.7. The source can be found here.

See uv's crate versioning policy for details on versioning.