mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Retain credentials for direct URLs in uv export
(#13809)
Reverts unintended breaking change from #13560 Test case from https://github.com/astral-sh/uv/pull/13808
This commit is contained in:
parent
63ba5e9f9e
commit
a96e766b55
2 changed files with 9 additions and 3 deletions
|
@ -108,7 +108,14 @@ impl std::fmt::Display for RequirementsTxtExport<'_> {
|
||||||
subdirectory: direct.subdirectory.clone(),
|
subdirectory: direct.subdirectory.clone(),
|
||||||
ext: DistExtension::Source(SourceDistExtension::TarGz),
|
ext: DistExtension::Source(SourceDistExtension::TarGz),
|
||||||
});
|
});
|
||||||
write!(f, "{} @ {}", package.id.name, url)?;
|
write!(
|
||||||
|
f,
|
||||||
|
"{} @ {}",
|
||||||
|
package.id.name,
|
||||||
|
// TODO(zanieb): We should probably omit passwords here by default, but we
|
||||||
|
// should change it in a breaking release and allow opt-in to include them.
|
||||||
|
url.displayable_with_credentials()
|
||||||
|
)?;
|
||||||
}
|
}
|
||||||
Source::Path(path) | Source::Directory(path) => {
|
Source::Path(path) | Source::Directory(path) => {
|
||||||
if path.is_absolute() {
|
if path.is_absolute() {
|
||||||
|
|
|
@ -1174,7 +1174,6 @@ fn requirements_txt_https_git_credentials() -> Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "git")]
|
|
||||||
#[test]
|
#[test]
|
||||||
fn requirements_txt_https_credentials() -> Result<()> {
|
fn requirements_txt_https_credentials() -> Result<()> {
|
||||||
let context = TestContext::new("3.12");
|
let context = TestContext::new("3.12");
|
||||||
|
@ -1197,7 +1196,7 @@ fn requirements_txt_https_credentials() -> Result<()> {
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
# This file was autogenerated by uv via the following command:
|
# This file was autogenerated by uv via the following command:
|
||||||
# uv export --cache-dir [CACHE_DIR]
|
# uv export --cache-dir [CACHE_DIR]
|
||||||
iniconfig @ https://public:****@pypi-proxy.fly.dev/basic-auth/files/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl \
|
iniconfig @ https://public:heron@pypi-proxy.fly.dev/basic-auth/files/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl \
|
||||||
--hash=sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374
|
--hash=sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374
|
||||||
# via project
|
# via project
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue