mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-03 18:38:21 +00:00
Improve PEP 691 compatibility (#428)
[PEP 691](https://peps.python.org/pep-0691/#project-detail) has slightly different, more relaxed rules around file metadata. These changes are now reflected in the `File` struct. This will make it easier to support alternative indices. I had expected that i need to introduce a separate type for that, so i'm happy it's two `Option`s more and an alias. Part of #412
This commit is contained in:
parent
3a4988f999
commit
751f7fa9c6
8 changed files with 53 additions and 27 deletions
|
@ -6,7 +6,7 @@ use distribution_filename::{SourceDistFilename, WheelFilename};
|
|||
use pep440_rs::Version;
|
||||
use platform_tags::{TagPriority, Tags};
|
||||
use puffin_normalize::PackageName;
|
||||
use pypi_types::SimpleJson;
|
||||
use pypi_types::{SimpleJson, Yanked};
|
||||
|
||||
use crate::file::{DistFile, SdistFile, WheelFile};
|
||||
use crate::pubgrub::PubGrubVersion;
|
||||
|
@ -45,7 +45,7 @@ impl VersionMap {
|
|||
// When resolving, exclude yanked files.
|
||||
// TODO(konstin): When we fail resolving due to a dependency locked to yanked version,
|
||||
// we should tell the user.
|
||||
if file.yanked.is_yanked() {
|
||||
if file.yanked.as_ref().is_some_and(Yanked::is_yanked) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue