Repository: astral-sh/uv
File: crates/uv/src/commands/publish.rs (Rust)

Code before:
    // Initialize the registry client.
    let check_url_client = if let Some(index_url) = &check_url {
        let registry_client_builder =
            RegistryClientBuilder::new(client_builder.clone(), cache.clone())
                .index_locations(index_locations)
                .keyring(keyring_provider);
        Some(CheckUrlClient {
            index_url: index_url.clone(),
            registry_client_builder,
            client: &upload_client,
            index_capabilities: IndexCapabilities::default(),
            cache,
        })
    } else {
        None
    };

    for group in groups {
        // Check if the filename is normalized (e.g., version `2025.09.4` should be `2025.9.4`).
        let normalized_filename = group.filename.to_string();
        if group.raw_filename != normalized_filename {
            if preview.is_enabled(PreviewFeature::PublishRequireNormalized) {
                warn_user_once!(
                    "`{}` has a non-normalized filename (expected `{normalized_filename}`), skipping",
                    group.raw_filename
                );
                continue;
            }
            warn_user_once!(
                "`{}` has a non-normalized filename (expected `{normalized_filename}`). \
                Pass `--preview-features {}` to skip such files.",
                group.raw_filename,
                PreviewFeature::PublishRequireNormalized
            );
        }

        if let Some(check_url_client) = &check_url_client {
            if uv_publish::check_url(
                check_url_client,
                &group.file,
                &group.filename,
                &download_concurrency,
            )
            .await?
            {
                writeln!(
                    printer.stderr(),
                    "File {} already exists, skipping",
                    group.filename
                )?;
                continue;

Review comment (suggestion):
Curious if people are still using uppercase names in wheel filenames (people do complain when we lowercase), we should get some data from the preview period.

> In distribution names, any run of -_. characters (HYPHEN-MINUS, LOW LINE and FULL STOP) should be replaced with _ (LOW LINE), and uppercase characters should be replaced with corresponding lowercase ones. This is equivalent to regular [name normalization](https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization) followed by replacing - with _. Tools consuming wheels must be prepared to accept . (FULL STOP) and uppercase letters, however, as these were allowed by an earlier version of this specification.

Code after:
        printer,
    )
    .await?;

    // Initialize the registry client.
    let check_url_client = if let Some(index_url) = &check_url {
        let registry_client_builder =
            RegistryClientBuilder::new(client_builder.clone(), cache.clone())
                .index_locations(index_locations)
                .keyring(keyring_provider);
        Some(CheckUrlClient {
            index_url: index_url.clone(),
            registry_client_builder,
            client: &upload_client,
            index_capabilities: IndexCapabilities::default(),
            cache,
        })
    } else {
        None
    };

    let mut error_count: usize = 0;

    for group in groups {
        // Check if the filename is normalized (e.g., version `2025.09.4` should be `2025.9.4`).
        let normalized_filename = group.filename.to_string();
        if group.raw_filename != normalized_filename {
            if preview.is_enabled(PreviewFeature::PublishRequireNormalized) {
                warn_user_once!(
                    "`{}` has a non-normalized filename (expected `{normalized_filename}`), skipping",
                    group.raw_filename
                );
                continue;
            }
            warn_user_once!(
                "`{}` has a non-normalized filename (expected `{normalized_filename}`). \
                Pass `--preview-features {}` to skip such files.",
                group.raw_filename,
                PreviewFeature::PublishRequireNormalized
            );
        }

        if let Some(check_url_client) = &check_url_client {
            match uv_publish::check_url(
                check_url_client,
                &group.file,
                &group.filename,
                &download_concurrency,
            )
            .await
            {