mirror of
https://github.com/astral-sh/uv.git
synced 2025-09-27 04:29:10 +00:00
Track yanked versions as incompatibilities (#1290)
Moves yanked version filtering from `VersionMap::from_metadata` to the resolver and tracks it as a PubGrub unavailable incompatibility so yanked versions are reflected in error messages. e.g. before ``` ╰─▶ Because only albatross<=0.1.0 is available and you require albatross>0.1.0, we can conclude that the requirements are unsatisfiable. ``` after ``` ╰─▶ Because only the following versions of albatross are available: albatross<=0.1.0 albatross==1.0.0 and albatross==1.0.0 is unusable because it was yanked, we can conclude that albatross>0.1.0 cannot be used. And because you require albatross>0.1.0, we can conclude that the requirements are unsatisfiable. ```
This commit is contained in:
parent
d8619f668a
commit
b5dd8b7de2
12 changed files with 263 additions and 138 deletions
|
@ -108,6 +108,12 @@ impl Yanked {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for Yanked {
|
||||
fn default() -> Self {
|
||||
Self::Bool(false)
|
||||
}
|
||||
}
|
||||
|
||||
/// A dictionary mapping a hash name to a hex encoded digest of the file.
|
||||
///
|
||||
/// PEP 691 says multiple hashes can be included and the interpretation is left to the client, we
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue