-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow duplicate URLs that resolve to the same canonical URL (#1877)
- Loading branch information
1 parent
12a96ad
commit 6afbb02
Showing
2 changed files
with
51 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1363,6 +1363,30 @@ fn conflicting_transitive_url_dependency() -> Result<()> { | |
Ok(()) | ||
} | ||
|
||
/// Request Werkzeug via two different URLs which resolve to the same canonical version. | ||
#[test] | ||
fn compatible_repeated_url_dependency() -> Result<()> { | ||
let context = TestContext::new("3.12"); | ||
let requirements_in = context.temp_dir.child("requirements.in"); | ||
requirements_in.write_str("werkzeug @ git+https://github.com/pallets/[email protected]\nwerkzeug @ git+https://github.com/pallets/[email protected]")?; | ||
|
||
uv_snapshot!(context.compile() | ||
.arg("requirements.in"), @r###" | ||
success: true | ||
exit_code: 0 | ||
----- stdout ----- | ||
# This file was autogenerated by uv via the following command: | ||
# uv pip compile --cache-dir [CACHE_DIR] --exclude-newer 2023-11-18T12:00:00Z requirements.in | ||
werkzeug @ git+https://github.com/pallets/werkzeug@af160e0b6b7ddd81c22f1652c728ff5ac72d5c74 | ||
----- stderr ----- | ||
Resolved 1 package in [TIME] | ||
"### | ||
); | ||
|
||
Ok(()) | ||
} | ||
|
||
/// Request `transitive_url_dependency`, which depends on `git+https://github.com/pallets/[email protected]`. | ||
/// Since this URL isn't declared upfront, we should reject it. | ||
#[test] | ||
|