Skip to content

Commit 3f107aa

Browse files
committed
Merge branch 'main' into local-version-semantics
2 parents e187a25 + 61ed2a2 commit 3f107aa

File tree

11 files changed

+91
-15
lines changed

11 files changed

+91
-15
lines changed

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,48 @@
11
# Changelog
22

3+
## 0.4.30
4+
5+
### Enhancements
6+
7+
- Add support for `.env` and custom env files in `uv run` ([#8811](https://github.com/astral-sh/uv/pull/8811))
8+
- Add support for `--all-packages` in `uv run`, `uv sync`, and `uv export` ([#8742](https://github.com/astral-sh/uv/pull/8742), [#8741](https://github.com/astral-sh/uv/pull/8741), [#8739](https://github.com/astral-sh/uv/pull/8739))
9+
- Allow use of `--frozen` with `--all-packages` in `uv sync` and `uv export` ([#8760](https://github.com/astral-sh/uv/pull/8760))
10+
- Show full error chain on tool upgrade failures ([#8753](https://github.com/astral-sh/uv/pull/8753))
11+
- Add `--check-url` to `uv publish` to check for existing distributions during upload ([#8531](https://github.com/astral-sh/uv/pull/8531))
12+
- Suggest using `--check-url` when `--skip-existing` is used ([#8803](https://github.com/astral-sh/uv/pull/8803))
13+
14+
### Bug fixes
15+
16+
- Allow incompatible `requires-python` for source distributions with static metadata ([#8768](https://github.com/astral-sh/uv/pull/8768))
17+
- Allow managed downloads with `--python-preference system` ([#8808](https://github.com/astral-sh/uv/pull/8808))
18+
- Avoid error for `--group` defined in non-root workspace member ([#8734](https://github.com/astral-sh/uv/pull/8734))
19+
- Avoid showing dependency group annotations on workspace members in tree ([#8730](https://github.com/astral-sh/uv/pull/8730))
20+
- Do not error when the Python bin directory is missing on `uv python uninstall` ([#8725](https://github.com/astral-sh/uv/pull/8725))
21+
- Include member groups when locking workspace ([#8736](https://github.com/astral-sh/uv/pull/8736))
22+
- Fix bug where `python_version < '0'` could appear in a final resolution ([#8759](https://github.com/astral-sh/uv/pull/8759))
23+
- Sanitize filenames during zip extraction ([#8732](https://github.com/astral-sh/uv/pull/8732))
24+
- Switch to RFC 9110 compatible format for exclude newer requests ([#8752](https://github.com/astral-sh/uv/pull/8752))
25+
26+
### Preview features
27+
28+
- Add support for installing versioned Python executables on Windows ([#8663](https://github.com/astral-sh/uv/pull/8663))
29+
- Improve interactions with existing Python executables during install ([#8733](https://github.com/astral-sh/uv/pull/8733))
30+
31+
### Rust API
32+
33+
- Extend `BaseClient` to accept extra middleware ([#8807](https://github.com/astral-sh/uv/pull/8807))
34+
- Add `From` for `FlatDistributions` struct ([#8800](https://github.com/astral-sh/uv/pull/8800))
35+
36+
### Documentation
37+
38+
- Fix environment variable name in providing credentials section ([#8740](https://github.com/astral-sh/uv/pull/8740))
39+
- Fix `add httpx` example with real git branch ([#8756](https://github.com/astral-sh/uv/pull/8756))
40+
- Fix indentation in `projects.md` ([#8772](https://github.com/astral-sh/uv/pull/8772))
41+
- Fix link to publish guide in `README` ([#8720](https://github.com/astral-sh/uv/pull/8720))
42+
- Generate environment variables documentation from code ([#8493](https://github.com/astral-sh/uv/pull/8493))
43+
- Improve and fix some documents ([#8749](https://github.com/astral-sh/uv/pull/8749))
44+
- Improve environment variables document ([#8777](https://github.com/astral-sh/uv/pull/8777))
45+
346
## 0.4.29
447

548
### Enhancements

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/uv-cli/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4882,8 +4882,11 @@ pub struct PublishArgs {
48824882
/// file succeeds even without `--check-url`, while most other indexes error.
48834883
///
48844884
/// The index must provide one of the supported hashes (SHA-256, SHA-384, or SHA-512).
4885-
#[arg(long,env = EnvVars::UV_PUBLISH_CHECK_URL)]
4885+
#[arg(long, env = EnvVars::UV_PUBLISH_CHECK_URL)]
48864886
pub check_url: Option<IndexUrl>,
4887+
4888+
#[arg(long, hide = true)]
4889+
pub skip_existing: bool,
48874890
}
48884891

48894892
/// See [PEP 517](https://peps.python.org/pep-0517/) and

crates/uv-version/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "uv-version"
3-
version = "0.4.29"
3+
version = "0.4.30"
44
edition = { workspace = true }
55
rust-version = { workspace = true }
66
homepage = { workspace = true }

crates/uv/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "uv"
3-
version = "0.4.29"
3+
version = "0.4.30"
44
edition = { workspace = true }
55
rust-version = { workspace = true }
66
homepage = { workspace = true }

crates/uv/src/lib.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::path::Path;
77
use std::process::ExitCode;
88

99
use anstream::eprintln;
10-
use anyhow::Result;
10+
use anyhow::{bail, Result};
1111
use clap::error::{ContextKind, ContextValue};
1212
use clap::{CommandFactory, Parser};
1313
use owo_colors::OwoColorize;
@@ -1130,6 +1130,16 @@ async fn run(mut cli: Cli) -> Result<ExitStatus> {
11301130
warn_user_once!("`uv publish` is experimental and may change without warning");
11311131
}
11321132

1133+
if args.skip_existing {
1134+
bail!(
1135+
"`uv publish` does not support `--skip-existing` because there is not a \
1136+
reliable way to identify when an upload fails due to an existing \
1137+
distribution. Instead, use `--check-url` to provide the URL to the simple \
1138+
API for your index. uv will check the index for existing distributions before \
1139+
attempting uploads."
1140+
);
1141+
}
1142+
11331143
// Resolve the settings from the command-line arguments and workspace configuration.
11341144
let PublishSettings {
11351145
files,

crates/uv/tests/it/publish.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,23 @@ fn no_credentials() {
142142
"###
143143
);
144144
}
145+
146+
/// Hint people that it's not `--skip-existing` but `--check-url`.
147+
#[test]
148+
fn skip_existing_redirect() {
149+
let context = TestContext::new("3.12");
150+
151+
uv_snapshot!(context.filters(), context.publish()
152+
.arg("--skip-existing")
153+
.arg("--publish-url")
154+
.arg("https://test.pypi.org/legacy/"), @r###"
155+
success: false
156+
exit_code: 2
157+
----- stdout -----
158+
159+
----- stderr -----
160+
warning: `uv publish` is experimental and may change without warning
161+
error: `uv publish` does not support `--skip-existing` because there is not a reliable way to identify when an upload fails due to an existing distribution. Instead, use `--check-url` to provide the URL to the simple API for your index. uv will check the index for existing distributions before attempting uploads.
162+
"###
163+
);
164+
}

docs/guides/integration/docker.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $ docker run ghcr.io/astral-sh/uv --help
2121
uv provides a distroless Docker image including the `uv` binary. The following tags are published:
2222

2323
- `ghcr.io/astral-sh/uv:latest`
24-
- `ghcr.io/astral-sh/uv:{major}.{minor}.{patch}`, e.g., `ghcr.io/astral-sh/uv:0.4.29`
24+
- `ghcr.io/astral-sh/uv:{major}.{minor}.{patch}`, e.g., `ghcr.io/astral-sh/uv:0.4.30`
2525
- `ghcr.io/astral-sh/uv:{major}.{minor}`, e.g., `ghcr.io/astral-sh/uv:0.4` (the latest patch
2626
version)
2727

@@ -62,7 +62,7 @@ In addition, uv publishes the following images:
6262

6363
As with the distroless image, each image is published with uv version tags as
6464
`ghcr.io/astral-sh/uv:{major}.{minor}.{patch}-{base}` and
65-
`ghcr.io/astral-sh/uv:{major}.{minor}-{base}`, e.g., `ghcr.io/astral-sh/uv:0.4.29-alpine`.
65+
`ghcr.io/astral-sh/uv:{major}.{minor}-{base}`, e.g., `ghcr.io/astral-sh/uv:0.4.30-alpine`.
6666

6767
For more details, see the [GitHub Container](https://github.com/astral-sh/uv/pkgs/container/uv)
6868
page.
@@ -100,13 +100,13 @@ Note this requires `curl` to be available.
100100
In either case, it is best practice to pin to a specific uv version, e.g., with:
101101

102102
```dockerfile
103-
COPY --from=ghcr.io/astral-sh/uv:0.4.29 /uv /uvx /bin/
103+
COPY --from=ghcr.io/astral-sh/uv:0.4.30 /uv /uvx /bin/
104104
```
105105

106106
Or, with the installer:
107107

108108
```dockerfile
109-
ADD https://astral.sh/uv/0.4.29/install.sh /uv-installer.sh
109+
ADD https://astral.sh/uv/0.4.30/install.sh /uv-installer.sh
110110
```
111111

112112
### Installing a project

docs/guides/integration/github.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uses: astral-sh/setup-uv@v3
4141
with:
4242
# Install a specific version of uv.
43-
version: "0.4.29"
43+
version: "0.4.30"
4444
```
4545
4646
## Setting up Python

docs/guides/integration/pre-commit.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ To compile requirements via pre-commit, add the following to the `.pre-commit-co
88
```yaml title=".pre-commit-config.yaml"
99
- repo: https://github.com/astral-sh/uv-pre-commit
1010
# uv version.
11-
rev: 0.4.29
11+
rev: 0.4.30
1212
hooks:
1313
# Compile requirements
1414
- id: pip-compile
@@ -20,7 +20,7 @@ To compile alternative files, modify `args` and `files`:
2020
```yaml title=".pre-commit-config.yaml"
2121
- repo: https://github.com/astral-sh/uv-pre-commit
2222
# uv version.
23-
rev: 0.4.29
23+
rev: 0.4.30
2424
hooks:
2525
# Compile requirements
2626
- id: pip-compile
@@ -33,7 +33,7 @@ To run the hook over multiple files at the same time:
3333
```yaml title=".pre-commit-config.yaml"
3434
- repo: https://github.com/astral-sh/uv-pre-commit
3535
# uv version.
36-
rev: 0.4.29
36+
rev: 0.4.30
3737
hooks:
3838
# Compile requirements
3939
- id: pip-compile

0 commit comments

Comments
 (0)