mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-28 23:53:45 +00:00
Enforce lockfile schema versions (#8509)
## Summary Historically, we haven't enforced schema versions. This PR adds a versioning policy such that, if a uv version writes schema v2, then... - It will always reject lockfiles with schema v3 or later. - It _may_ reject lockfiles with schema v1, but can also choose to read them, if possible. (For example, the change we proposed to rename `dev-dependencies` to `dependency-groups` would've been backwards-compatible: newer versions of uv could still read lockfiles that used the `dev-dependencies` field name, but older versions should reject lockfiles that use the `dependency-groups` field name.) Closes https://github.com/astral-sh/uv/issues/8465.
This commit is contained in:
parent
b713877bdc
commit
2651aee33f
8 changed files with 201 additions and 18 deletions
|
@ -4,7 +4,8 @@ pub use exclude_newer::ExcludeNewer;
|
|||
pub use exclusions::Exclusions;
|
||||
pub use flat_index::{FlatDistributions, FlatIndex};
|
||||
pub use lock::{
|
||||
Lock, LockError, RequirementsTxtExport, ResolverManifest, SatisfiesResult, TreeDisplay,
|
||||
Lock, LockError, LockVersion, RequirementsTxtExport, ResolverManifest, SatisfiesResult,
|
||||
TreeDisplay, VERSION,
|
||||
};
|
||||
pub use manifest::Manifest;
|
||||
pub use options::{Flexibility, Options, OptionsBuilder};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue