Bump version to 0.9.0 (#16161)

Co-authored-by: konsti <konstin@mailbox.org>
This commit is contained in:
Zanie Blue 2025-10-07 18:17:42 -05:00 committed by GitHub
parent 593678055f
commit 39b6886536
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 160 additions and 33 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "uv-build"
version = "0.8.24"
version = "0.9.0"
edition = { workspace = true }
rust-version = { workspace = true }
homepage = { workspace = true }

View file

@ -1,6 +1,6 @@
[project]
name = "uv-build"
version = "0.8.24"
version = "0.9.0"
description = "The uv build backend"
authors = [{ name = "Astral Software Inc.", email = "hey@astral.sh" }]
requires-python = ">=3.8"

View file

@ -1,6 +1,6 @@
[package]
name = "uv-version"
version = "0.8.24"
version = "0.9.0"
edition = { workspace = true }
rust-version = { workspace = true }
homepage = { workspace = true }

View file

@ -201,6 +201,10 @@ impl Workspace {
let path = std::path::absolute(path)
.map_err(WorkspaceError::Normalize)?
.clone();
// Remove `.` and `..`
let path = uv_fs::normalize_path(&path);
// Trim trailing slashes.
let path = path.components().collect::<PathBuf>();
let project_path = path
.ancestors()
@ -1363,6 +1367,10 @@ impl ProjectWorkspace {
let project_path = std::path::absolute(install_path)
.map_err(WorkspaceError::Normalize)?
.clone();
// Remove `.` and `..`
let project_path = uv_fs::normalize_path(&project_path);
// Trim trailing slashes.
let project_path = project_path.components().collect::<PathBuf>();
// Check if workspaces are explicitly disabled for the project.
if project_pyproject_toml

View file

@ -1,6 +1,6 @@
[package]
name = "uv"
version = "0.8.24"
version = "0.9.0"
edition = { workspace = true }
rust-version = { workspace = true }
homepage = { workspace = true }

View file

@ -2084,3 +2084,65 @@ fn venv_included_in_sdist() -> Result<()> {
Ok(())
}
/// Ensure that workspace discovery works with and without trailing slash.
///
/// <https://github.com/astral-sh/uv/issues/13914>
#[test]
fn test_workspace_trailing_slash() {
let context = TestContext::new("3.12");
// Create a workspace with a root and a member.
context.init().arg("--lib").assert().success();
context.init().arg("--lib").arg("child").assert().success();
uv_snapshot!(context.filters(), context.build().arg("child"), @r"
success: true
exit_code: 0
----- stdout -----
----- stderr -----
Building source distribution (uv build backend)...
Building wheel from source distribution (uv build backend)...
Successfully built dist/child-0.1.0.tar.gz
Successfully built dist/child-0.1.0-py3-none-any.whl
");
// Check that workspace discovery still works.
uv_snapshot!(context.filters(), context.build().arg("child/"), @r"
success: true
exit_code: 0
----- stdout -----
----- stderr -----
Building source distribution (uv build backend)...
Building wheel from source distribution (uv build backend)...
Successfully built dist/child-0.1.0.tar.gz
Successfully built dist/child-0.1.0-py3-none-any.whl
");
// Check general normalization too.
uv_snapshot!(context.filters(), context.build().arg("./child/"), @r"
success: true
exit_code: 0
----- stdout -----
----- stderr -----
Building source distribution (uv build backend)...
Building wheel from source distribution (uv build backend)...
Successfully built dist/child-0.1.0.tar.gz
Successfully built dist/child-0.1.0-py3-none-any.whl
");
uv_snapshot!(context.filters(), context.build().arg("./child/../child/"), @r"
success: true
exit_code: 0
----- stdout -----
----- stderr -----
Building source distribution (uv build backend)...
Building wheel from source distribution (uv build backend)...
Successfully built dist/child-0.1.0.tar.gz
Successfully built dist/child-0.1.0-py3-none-any.whl
");
}