mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
Treat local indexes as registry sources in lockfile (#6016)
## Summary Closes https://github.com/astral-sh/uv/issues/6013. Closes https://github.com/astral-sh/uv/issues/6014. Adds test coverage for https://github.com/astral-sh/uv/issues/6015.
This commit is contained in:
parent
0b999557fb
commit
e941bb6623
2 changed files with 484 additions and 13 deletions
|
@ -1545,16 +1545,7 @@ impl Source {
|
|||
fn from_index_url(index_url: &IndexUrl) -> Source {
|
||||
// Remove any sensitive credentials from the index URL.
|
||||
let redacted = index_url.redacted();
|
||||
match *index_url {
|
||||
IndexUrl::Pypi(_) => Source::Registry(UrlString::from(redacted.as_ref())),
|
||||
IndexUrl::Url(_) => Source::Registry(UrlString::from(redacted.as_ref())),
|
||||
// TODO(konsti): Retain path on index url without converting to URL.
|
||||
IndexUrl::Path(_) => Source::Path(
|
||||
redacted
|
||||
.to_file_path()
|
||||
.expect("Could not convert index URL to path"),
|
||||
),
|
||||
}
|
||||
Source::Registry(UrlString::from(redacted.as_ref()))
|
||||
}
|
||||
|
||||
fn from_git_dist(git_dist: &GitSourceDist) -> Source {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue