@@ -7,7 +7,7 @@ use anyhow::{anyhow, Result};
77use clap:: builder:: styling:: { AnsiColor , Effects , Style } ;
88use clap:: builder:: Styles ;
99use clap:: { Args , Parser , Subcommand } ;
10- use distribution_types:: { FlatIndexLocation , IndexSource , IndexUrl } ;
10+ use distribution_types:: { FlatIndexLocation , Index , IndexUrl } ;
1111use pep508_rs:: Requirement ;
1212use pypi_types:: VerbatimParsedUrl ;
1313use url:: Url ;
@@ -779,13 +779,13 @@ fn parse_index_url(input: &str) -> Result<Maybe<IndexUrl>, String> {
779779 }
780780}
781781
782- /// Parse a string into an [`IndexSource `], mapping the empty string to `None`.
783- fn parse_index_source ( input : & str ) -> Result < Maybe < IndexSource > , String > {
782+ /// Parse a string into an [`Index `], mapping the empty string to `None`.
783+ fn parse_index_source ( input : & str ) -> Result < Maybe < Index > , String > {
784784 if input. is_empty ( ) {
785785 Ok ( Maybe :: None )
786786 } else {
787- match IndexSource :: from_str ( input) {
788- Ok ( index) => Ok ( Maybe :: Some ( IndexSource {
787+ match Index :: from_str ( input) {
788+ Ok ( index) => Ok ( Maybe :: Some ( Index {
789789 default : false ,
790790 ..index
791791 } ) ) ,
@@ -794,13 +794,13 @@ fn parse_index_source(input: &str) -> Result<Maybe<IndexSource>, String> {
794794 }
795795}
796796
797- /// Parse a string into an [`IndexSource `], mapping the empty string to `None`.
798- fn parse_default_index_source ( input : & str ) -> Result < Maybe < IndexSource > , String > {
797+ /// Parse a string into an [`Index `], mapping the empty string to `None`.
798+ fn parse_default_index_source ( input : & str ) -> Result < Maybe < Index > , String > {
799799 if input. is_empty ( ) {
800800 Ok ( Maybe :: None )
801801 } else {
802- match IndexSource :: from_str ( input) {
803- Ok ( index) => Ok ( Maybe :: Some ( IndexSource {
802+ match Index :: from_str ( input) {
803+ Ok ( index) => Ok ( Maybe :: Some ( Index {
804804 default : true ,
805805 ..index
806806 } ) ) ,
@@ -2250,8 +2250,8 @@ pub struct VenvArgs {
22502250 ///
22512251 /// By default, uv will stop at the first index on which a given package is available, and
22522252 /// limit resolutions to those present on that first index (`first-match`). This prevents
2253- /// "dependency confusion" attacks, whereby an attack can upload a malicious package under the
2254- /// same name to a secondary .
2253+ /// "dependency confusion" attacks, whereby an attacker can upload a malicious package under the
2254+ /// same name to an alternate index .
22552255 #[ arg( long, value_enum, env = "UV_INDEX_STRATEGY" ) ]
22562256 pub index_strategy : Option < IndexStrategy > ,
22572257
@@ -3702,7 +3702,7 @@ pub struct GenerateShellCompletionArgs {
37023702#[ derive( Args ) ]
37033703#[ allow( clippy:: struct_excessive_bools) ]
37043704pub struct IndexArgs {
3705- /// The URLs of packages indexes to use when resolving dependencies.
3705+ /// The URLs to use when resolving dependencies, in addition to the default index .
37063706 ///
37073707 /// Accepts either a repository compliant with PEP 503 (the simple repository API), or a local
37083708 /// directory laid out in the same format.
@@ -3711,7 +3711,7 @@ pub struct IndexArgs {
37113711 /// `--default-index` (which defaults to PyPI). When multiple `--index` flags are
37123712 /// provided, earlier values take priority.
37133713 #[ arg( long, env = "UV_INDEX" , value_delimiter = ' ' , value_parser = parse_index_source, help_heading = "Index options" ) ]
3714- pub index : Option < Vec < Maybe < IndexSource > > > ,
3714+ pub index : Option < Vec < Maybe < Index > > > ,
37153715
37163716 /// The URL of the default package index (by default: <https://pypi.org/simple>).
37173717 ///
@@ -3721,7 +3721,7 @@ pub struct IndexArgs {
37213721 /// The index given by this flag is given lower priority than all other indexes specified via
37223722 /// the `--index` flag.
37233723 #[ arg( long, env = "UV_DEFAULT_INDEX" , value_parser = parse_default_index_source, help_heading = "Index options" ) ]
3724- pub default_index : Option < Maybe < IndexSource > > ,
3724+ pub default_index : Option < Maybe < Index > > ,
37253725
37263726 /// The URL of the Python package index (by default: <https://pypi.org/simple>).
37273727 ///
@@ -3868,8 +3868,8 @@ pub struct InstallerArgs {
38683868 ///
38693869 /// By default, uv will stop at the first index on which a given package is available, and
38703870 /// limit resolutions to those present on that first index (`first-match`). This prevents
3871- /// "dependency confusion" attacks, whereby an attack can upload a malicious package under the
3872- /// same name to a secondary .
3871+ /// "dependency confusion" attacks, whereby an attacker can upload a malicious package under the
3872+ /// same name to an alternate index .
38733873 #[ arg(
38743874 long,
38753875 value_enum,
@@ -4030,8 +4030,8 @@ pub struct ResolverArgs {
40304030 ///
40314031 /// By default, uv will stop at the first index on which a given package is available, and
40324032 /// limit resolutions to those present on that first index (`first-match`). This prevents
4033- /// "dependency confusion" attacks, whereby an attack can upload a malicious package under the
4034- /// same name to a secondary .
4033+ /// "dependency confusion" attacks, whereby an attacker can upload a malicious package under the
4034+ /// same name to an alternate index .
40354035 #[ arg(
40364036 long,
40374037 value_enum,
@@ -4222,8 +4222,8 @@ pub struct ResolverInstallerArgs {
42224222 ///
42234223 /// By default, uv will stop at the first index on which a given package is available, and
42244224 /// limit resolutions to those present on that first index (`first-match`). This prevents
4225- /// "dependency confusion" attacks, whereby an attack can upload a malicious package under the
4226- /// same name to a secondary .
4225+ /// "dependency confusion" attacks, whereby an attacker can upload a malicious package under the
4226+ /// same name to an alternate index .
42274227 #[ arg(
42284228 long,
42294229 value_enum,
0 commit comments