Hint at wrong endpoint in publish (#7872)

Improve hints when using the simple index URL instead of the upload URL
in `uv publish`. This is the most common confusion when publishing, so
we give it some extra care and put it more centrally in the CLI help.

Fixes #7860

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
This commit is contained in:
konsti 2024-10-08 21:16:02 +02:00 committed by GitHub
parent 9e98055a9e
commit 282fab5f70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 34 additions and 14 deletions

View file

@ -4449,7 +4449,8 @@ pub struct DisplayTreeArgs {
#[arg(long)]
pub no_dedupe: bool,
/// Show the reverse dependencies for the given package. This flag will invert the tree and display the packages that depend on the given package.
/// Show the reverse dependencies for the given package. This flag will invert the tree and
/// display the packages that depend on the given package.
#[arg(long, alias = "reverse")]
pub invert: bool,
}
@ -4463,9 +4464,10 @@ pub struct PublishArgs {
#[arg(default_value = "dist/*")]
pub files: Vec<String>,
/// The URL of the upload endpoint.
/// The URL of the upload endpoint (not the index URL).
///
/// Note that this typically differs from the index URL.
/// Note that there are typically different URLs for index access (e.g., `https:://.../simple`)
/// and index upload.
///
/// Defaults to PyPI's publish URL (<https://upload.pypi.org/legacy/>).
///