diff --git a/crates/uv-resolver/src/lock/export/pylock_toml.rs b/crates/uv-resolver/src/lock/export/pylock_toml.rs index fcbe107fdf0f1..d98e7b37d24a2 100644 --- a/crates/uv-resolver/src/lock/export/pylock_toml.rs +++ b/crates/uv-resolver/src/lock/export/pylock_toml.rs @@ -204,6 +204,7 @@ pub struct PylockToml { pub dependency_groups: Vec, #[serde(skip_serializing_if = "Vec::is_empty", default)] pub default_groups: Vec, + #[serde(skip_serializing_if = "Vec::is_empty", default)] pub packages: Vec, #[serde(skip_serializing_if = "Vec::is_empty", default)] attestation_identities: Vec, diff --git a/crates/uv/tests/pip/pip_sync.rs b/crates/uv/tests/pip/pip_sync.rs index 93cdbd55f4a41..72e0aa9ca7d4a 100644 --- a/crates/uv/tests/pip/pip_sync.rs +++ b/crates/uv/tests/pip/pip_sync.rs @@ -6068,36 +6068,6 @@ fn pep_751() -> Result<()> { Ok(()) } -#[test] -fn pep_751_requires_packages() -> Result<()> { - let context = uv_test::test_context!("3.12"); - - context.temp_dir.child("pylock.toml").write_str( - r#" - lock-version = "1.0" - created-by = "uv" - "#, - )?; - - uv_snapshot!(context.filters(), context.pip_sync() - .arg("--preview") - .arg("pylock.toml"), @r#" - success: false - exit_code: 2 - ----- stdout ----- - - ----- stderr ----- - error: Not a valid `pylock.toml` file: pylock.toml - Caused by: TOML parse error at line 1, column 1 - | - 1 | - | ^ - missing field `packages` - "#); - - Ok(()) -} - #[test] fn pep_751_require_hashes_directory() -> Result<()> { let context = uv_test::test_context!("3.12");