Skip to content

Fix relative and absolute path handling in lockfiles#4266

Merged
BurntSushi merged 1 commit intomainfrom
konsti/relative-path-handling-fix
Jun 13, 2024
Merged

Fix relative and absolute path handling in lockfiles#4266
BurntSushi merged 1 commit intomainfrom
konsti/relative-path-handling-fix

Conversation

@konstin
Copy link
Copy Markdown
Member

@konstin konstin commented Jun 12, 2024

Previously, b in the test case would have been incorrectly locked to the path of a. I've moved relative_to into uv-fs since it's now used in two different places.

Previously failing lockfile when a/pyproject.toml and a/b/pyproject.toml exist (not in a workspace) and a was depending on b:

version = 1
requires-python = ">=3.11, <3.13"

[[distribution]]
name = "b"
version = "0.1.0"
source = "directory+/home/konsti/projects/uv/a"
sdist = { path = "/home/konsti/projects/uv/a" }

[[distribution]]
name = "black"
version = "0.1.0"
source = "editable+."
sdist = { path = "." }

[[distribution.dependencies]]
name = "b"
version = "0.1.0"
source = "directory+/home/konsti/projects/uv/a"

@konstin konstin added bug Something isn't working preview Experimental behavior labels Jun 12, 2024
Previously, `b` would have been incorrectly locked to `a`.
@BurntSushi BurntSushi force-pushed the konsti/relative-path-handling-fix branch from b5d85f9 to a645f6b Compare June 13, 2024 15:40
@BurntSushi BurntSushi merged commit 3012695 into main Jun 13, 2024
@BurntSushi BurntSushi deleted the konsti/relative-path-handling-fix branch June 13, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working preview Experimental behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants