astral-sh / uv

An extremely fast Python package installer and resolver, written in Rust.
https://astral.sh/
Apache License 2.0
13.04k stars 362 forks source link

Stop accessing pubgrub's incompatibilities directly #4187

Open konstin opened 2 weeks ago

konstin commented 2 weeks ago

When computing the dependency edges, we currently use pubgrub's incompatibilities database:

https://github.com/astral-sh/uv/blob/e7c573cfcb069cc940b8838ecb5f8d1e4858c304/crates/uv-resolver/src/resolver/mod.rs#L1515-L1524

The incompatibilities are an implementation detail of pubgrub. We should instead use the requirements to construct the edges.

charliermarsh commented 2 weeks ago

I'm mixed on this though I understand the motivation. It seems natural that we should get the resolution from PubGrub given that it solved the graph!