@@ -20,7 +20,7 @@ use pixi_spec::Subdirectory;
2020use pixi_uv_context:: UvResolutionContext ;
2121use pixi_uv_conversions:: {
2222 configure_insecure_hosts_for_tls_bypass, into_pixi_reference, pypi_options_to_build_options,
23- pypi_options_to_index_locations, to_index_strategy,
23+ pypi_options_to_index_locations, to_index_strategy, to_requirements ,
2424} ;
2525use pypi_modifiers:: pypi_marker_env:: determine_marker_environment;
2626use pypi_modifiers:: pypi_tags:: { get_pypi_tags, is_python_record} ;
@@ -752,22 +752,16 @@ async fn read_local_package_metadata(
752752 }
753753 } ;
754754
755- // A round-trip failure here would be a uv bug, not "static doesn't
756- // apply", so propagate rather than swallow as `Ok(None)`.
757- let requires_dist_vec: Vec < pep508_rs:: Requirement > = requires_dist
758- . requires_dist
759- . iter ( )
760- . map ( |req| {
761- req. to_string ( )
762- . parse :: < pep508_rs:: Requirement > ( )
763- . map_err ( |e| {
764- PlatformUnsat :: FailedToReadLocalMetadata (
765- package_name. clone ( ) ,
766- format ! ( "Invalid requirement: {e}" ) ,
767- )
768- } )
769- } )
770- . collect :: < Result < _ , _ > > ( ) ?;
755+ // Match the lockfile-write serializer so both sides of
756+ // `compare_metadata` agree on `[tool.uv.sources]` requirements
757+ // (#6049 follow-up).
758+ let requires_dist_vec: Vec < pep508_rs:: Requirement > =
759+ to_requirements ( requires_dist. requires_dist . iter ( ) ) . map_err ( |e| {
760+ PlatformUnsat :: FailedToReadLocalMetadata (
761+ package_name. clone ( ) ,
762+ format ! ( "Invalid requirement: {e}" ) ,
763+ )
764+ } ) ?;
771765
772766 let metadata = pypi_metadata:: LocalPackageMetadata {
773767 version,
0 commit comments