@@ -6,7 +6,6 @@ use either::Either;
66use thiserror:: Error ;
77use url:: Url ;
88
9- use uv_configuration:: LowerBound ;
109use uv_distribution_filename:: DistExtension ;
1110use uv_distribution_types:: { Index , IndexLocations , IndexName , Origin } ;
1211use uv_git:: GitReference ;
@@ -16,7 +15,6 @@ use uv_pep508::{looks_like_git_repository, MarkerTree, VerbatimUrl, VersionOrUrl
1615use uv_pypi_types:: {
1716 ConflictItem , ParsedUrlError , Requirement , RequirementSource , VerbatimParsedUrl ,
1817} ;
19- use uv_warnings:: warn_user_once;
2018use uv_workspace:: pyproject:: { PyProjectToml , Source , Sources } ;
2119use uv_workspace:: Workspace ;
2220
@@ -45,7 +43,7 @@ impl LoweredRequirement {
4543 group : Option < & GroupName > ,
4644 locations : & ' data IndexLocations ,
4745 workspace : & ' data Workspace ,
48- lower_bound : LowerBound ,
46+
4947 git_member : Option < & ' data GitWorkspaceMember < ' data > > ,
5048 ) -> impl Iterator < Item = Result < Self , LoweringError > > + ' data {
5149 // Identify the source from the `tool.uv.sources` table.
@@ -136,19 +134,6 @@ impl LoweredRequirement {
136134 }
137135
138136 let Some ( sources) = sources else {
139- let has_sources = !project_sources. is_empty ( ) || !workspace. sources ( ) . is_empty ( ) ;
140- if matches ! ( lower_bound, LowerBound :: Warn ) {
141- // Support recursive editable inclusions.
142- if has_sources
143- && requirement. version_or_url . is_none ( )
144- && project_name. is_none_or ( |project_name| * project_name != requirement. name )
145- {
146- warn_user_once ! (
147- "Missing version constraint (e.g., a lower bound) for `{}`" ,
148- requirement. name
149- ) ;
150- }
151- }
152137 return Either :: Left ( std:: iter:: once ( Ok ( Self ( Requirement :: from ( requirement) ) ) ) ) ;
153138 } ;
154139
@@ -252,12 +237,7 @@ impl LoweredRequirement {
252237 } )
253238 }
254239 } ) ;
255- let source = registry_source (
256- & requirement,
257- index. into_url ( ) ,
258- conflict,
259- lower_bound,
260- ) ;
240+ let source = registry_source ( & requirement, index. into_url ( ) , conflict) ;
261241 ( source, marker)
262242 }
263243 Source :: Workspace {
@@ -367,7 +347,6 @@ impl LoweredRequirement {
367347 sources : & ' data BTreeMap < PackageName , Sources > ,
368348 indexes : & ' data [ Index ] ,
369349 locations : & ' data IndexLocations ,
370- lower_bound : LowerBound ,
371350 ) -> impl Iterator < Item = Result < Self , LoweringError > > + ' data {
372351 let source = sources. get ( & requirement. name ) . cloned ( ) ;
373352
@@ -473,12 +452,7 @@ impl LoweredRequirement {
473452 ) ) ;
474453 } ;
475454 let conflict = None ;
476- let source = registry_source (
477- & requirement,
478- index. into_url ( ) ,
479- conflict,
480- lower_bound,
481- ) ;
455+ let source = registry_source ( & requirement, index. into_url ( ) , conflict) ;
482456 ( source, marker)
483457 }
484458 Source :: Workspace { .. } => {
@@ -652,40 +626,23 @@ fn registry_source(
652626 requirement : & uv_pep508:: Requirement < VerbatimParsedUrl > ,
653627 index : Url ,
654628 conflict : Option < ConflictItem > ,
655- bounds : LowerBound ,
656629) -> RequirementSource {
657630 match & requirement. version_or_url {
658- None => {
659- if matches ! ( bounds, LowerBound :: Warn ) {
660- warn_user_once ! (
661- "Missing version constraint (e.g., a lower bound) for `{}`" ,
662- requirement. name
663- ) ;
664- }
665- RequirementSource :: Registry {
666- specifier : VersionSpecifiers :: empty ( ) ,
667- index : Some ( index) ,
668- conflict,
669- }
670- }
631+ None => RequirementSource :: Registry {
632+ specifier : VersionSpecifiers :: empty ( ) ,
633+ index : Some ( index) ,
634+ conflict,
635+ } ,
671636 Some ( VersionOrUrl :: VersionSpecifier ( version) ) => RequirementSource :: Registry {
672637 specifier : version. clone ( ) ,
673638 index : Some ( index) ,
674639 conflict,
675640 } ,
676- Some ( VersionOrUrl :: Url ( _) ) => {
677- if matches ! ( bounds, LowerBound :: Warn ) {
678- warn_user_once ! (
679- "Missing version constraint (e.g., a lower bound) for `{}` due to use of a URL specifier" ,
680- requirement. name
681- ) ;
682- }
683- RequirementSource :: Registry {
684- specifier : VersionSpecifiers :: empty ( ) ,
685- index : Some ( index) ,
686- conflict,
687- }
688- }
641+ Some ( VersionOrUrl :: Url ( _) ) => RequirementSource :: Registry {
642+ specifier : VersionSpecifiers :: empty ( ) ,
643+ index : Some ( index) ,
644+ conflict,
645+ } ,
689646 }
690647}
691648
0 commit comments