astral-sh/uv · error · anyhow::Error
pip-compile's `--max-rounds` is unsupported (uv always resol
Error message
pip-compile's `--max-rounds` is unsupported (uv always resolves until convergence)
What it means
pip-tools' `--max-rounds N` caps the number of iterative resolution rounds pip-compile performs before giving up. uv's resolver is not round-based — it resolves until convergence in one pass — so `PipCompileCompatArgs::validate()` rejects any `Some(max_rounds)` value instead of pretending a limit exists.
Source
Thrown at crates/uv-cli/src/compat.rs:105
}
if let Some(resolver) = self.resolver {
match resolver {
Resolver::Backtracking => {
warn_user!(
"pip-compile's `--resolver=backtracking` has no effect (uv always backtracks)"
);
}
Resolver::Legacy => {
return Err(anyhow!(
"pip-compile's `--resolver=legacy` is unsupported (uv always backtracks)"
));
}
}
}
if self.max_rounds.is_some() {
return Err(anyhow!(
"pip-compile's `--max-rounds` is unsupported (uv always resolves until convergence)"
));
}
if self.client_cert.is_some() {
return Err(anyhow!(
"pip-compile's `--client-cert` is unsupported (uv doesn't support dedicated client certificates)"
));
}
if self.emit_trusted_host {
return Err(anyhow!(
"pip-compile's `--emit-trusted-host` is unsupported"
));
}
if self.no_emit_trusted_host {
warn_user!(View on GitHub (pinned to f1a42680ff)
Solutions
- Remove `--max-rounds` from the command; uv resolves until it converges or fails on its own.
- If you hit genuine non-convergence with uv, report it as a uv bug rather than re-adding the flag.
- Clean up other unsupported pip-compile flags in the same script in one pass.
Example fix
# before uv pip compile --max-rounds 10 requirements.in # after uv pip compile requirements.in
Defensive patterns
Strategy: validation
Validate before calling
import re
def assert_no_round_limits(argv: list[str]) -> None:
if any(re.match(r"--max-rounds(=|$)", a) for a in argv):
raise ValueError("uv pip compile has no round limit; remove --max-rounds") Prevention
- Strip pip-compile defaults like `--max-rounds 10` when migrating scripts.
- Rely on uv's own convergence reporting instead of round budgets.
- Keep migrated command lines in reviewable config files so dead flags are caught in code review.
When it happens
Trigger: `uv pip compile --max-rounds 10 requirements.in` (any integer value triggers it, including pip-compile's old default `--max-rounds 10` written out explicitly in scripts).
Common situations: CI jobs that copied verbose pip-compile invocations including the default round limit; teams raising/lowering rounds to work around old pip-tools non-convergence who then switch to uv.
Related errors
- pip-compile's `--resolver=legacy` is unsupported (uv always
- pip-compile's `--reuse-hashes` is unsupported (uv doesn't re
- pip-compile's `--client-cert` is unsupported (uv doesn't sup
- pip-compile's `--emit-trusted-host` is unsupported
- pip-compile's `--config` is unsupported (uv does not use a c
AI-assisted analysis of astral-sh/uv@f1a42680ff (2026-08-16).
Data as JSON: /api/errors/a4ce12921df2c8a8.
Report an issue: GitHub.