Make check-url available in configuration files (#9032)

## Summary

Fixes #9027

Minor enhancement on top of #8531 that makes the CLI parameter
`--check-url` also available as the setting `check-url` in configuration
files.

## Test Plan

Updates existing tests to take the new setting into account.

Within publish command testing I didn't see existing tests covering
settings from toml files (instead of from CLI params), so I didn't add
anything of that sort.
This commit is contained in:
Daniel Bruckner 2024-12-02 15:30:12 -08:00 committed by GitHub
parent 0e6b2d92b8
commit d489071d14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 78 additions and 3 deletions

View file

@ -457,6 +457,42 @@ globs are interpreted as relative to the project directory.
---
### [`check-url`](#check-url) {: #check-url }
Check an index URL for existing files to skip duplicate uploads.
This option allows retrying publishing that failed after only some, but not all files have
been uploaded, and handles error due to parallel uploads of the same file.
Before uploading, the index is checked. If the exact same file already exists in the index,
the file will not be uploaded. If an error occurred during the upload, the index is checked
again, to handle cases where the identical file was uploaded twice in parallel.
The exact behavior will vary based on the index. When uploading to PyPI, uploading the same
file succeeds even without `--check-url`, while most other indexes error.
The index must provide one of the supported hashes (SHA-256, SHA-384, or SHA-512).
**Default value**: `None`
**Type**: `str`
**Example usage**:
=== "pyproject.toml"
```toml
[tool.uv]
check-url = "https://test.pypi.org/simple"
```
=== "uv.toml"
```toml
check-url = "https://test.pypi.org/simple"
```
---
### [`compile-bytecode`](#compile-bytecode) {: #compile-bytecode }
Compile Python files to bytecode after installation.