Skip to content

Preserve absolute/relative paths passed to uv add#18402

Open
EliteTK wants to merge 1 commit into
mainfrom
tk/absolute-relative-path-fix-breaking
Open

Preserve absolute/relative paths passed to uv add#18402
EliteTK wants to merge 1 commit into
mainfrom
tk/absolute-relative-path-fix-breaking

Conversation

@EliteTK

@EliteTK EliteTK commented Mar 11, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #18176. This fixes the remaining absolute/relative path issues when uv add edits pyproject.toml.

uv add now preserves the user's path form:

This applies to local directories and local archives.

Test Plan

  • Integration coverage for relative paths, absolute paths, and literal file:// URLs.
  • Integration coverage for directory and archive sources.
  • Regression coverage for expanded-variable URLs.
  • cargo nextest run -E 'test(add_relative_and_absolute_paths) or test(add_relative_and_absolute_archives) or test(lock_pep508_urls_with_vars)'
  • cargo nextest run -p uv-pep508 -p uv-pypi-types
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
  • cargo xwin clippy --workspace --all-targets --all-features --locked -- -D warnings

@EliteTK EliteTK requested a review from konstin March 11, 2026 00:15
@EliteTK EliteTK added bug Something isn't working breaking A breaking change labels Mar 11, 2026
@EliteTK EliteTK added this to the v0.11.0 milestone Mar 11, 2026
@EliteTK EliteTK marked this pull request as draft March 11, 2026 00:22
@EliteTK EliteTK force-pushed the tk/absolute-relative-path-fix branch from 8c38f1a to 666ae61 Compare March 11, 2026 00:28
@EliteTK EliteTK marked this pull request as ready for review March 11, 2026 00:34
@konstin

konstin commented Mar 11, 2026

Copy link
Copy Markdown
Member

There's an empty diff in this branch, probably needs a rebase?

@EliteTK EliteTK force-pushed the tk/absolute-relative-path-fix-breaking branch from 44b79e5 to 13eeebc Compare March 11, 2026 14:06
@EliteTK

EliteTK commented Mar 11, 2026

Copy link
Copy Markdown
Member Author

No idea what happened there... It's fixed now.

Base automatically changed from tk/absolute-relative-path-fix to main March 13, 2026 17:42
@zanieb zanieb modified the milestones: v0.11.0, v0.12.0 Apr 7, 2026
@konstin konstin mentioned this pull request Jun 26, 2026
@EliteTK EliteTK force-pushed the tk/absolute-relative-path-fix-breaking branch from 13eeebc to edc1693 Compare June 26, 2026 13:10
@astral-sh-bot

astral-sh-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

uv test inventory changes

This PR changes the tests when compared with the latest main baseline.

  • Added tests: 1
  • Removed tests: 0
  • Changed suites: 1
uv::project: +1 / -0

Added:

  • uv::project::edit::add_relative_and_absolute_archives

Removed: none

konstin added a commit that referenced this pull request Jun 26, 2026
Preserve absolute/relative paths passed to uv add
konstin added a commit that referenced this pull request Jun 26, 2026
Preserve absolute/relative paths passed to uv add
konstin added a commit that referenced this pull request Jun 26, 2026
Preserve absolute/relative paths passed to uv add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking A breaking change bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

uv add results in relative path for a local package

3 participants