mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-29 11:07:59 +00:00
Respect pyproject.toml credentials from user-provided requirements (#7474)
## Summary When syncing a lockfile, we need to respect credentials defined in the `pyproject.toml`, even if they won't be used for resolution. Unfortunately, this includes credentials in `tool.uv.sources`, `tool.uv.dev-dependencies`, `project.dependencies`, and `project.optional-dependencies`. Closes https://github.com/astral-sh/uv/issues/7453.
This commit is contained in:
parent
08a7c708d1
commit
c2ad31aa58
8 changed files with 317 additions and 29 deletions
|
|
@ -1,8 +1,6 @@
|
|||
use std::sync::LazyLock;
|
||||
|
||||
use url::Url;
|
||||
|
||||
use crate::credentials::GitStore;
|
||||
pub use crate::credentials::{store_credentials_from_url, GIT_STORE};
|
||||
pub use crate::git::GitReference;
|
||||
pub use crate::resolver::{
|
||||
GitResolver, GitResolverError, RepositoryReference, ResolvedRepositoryReference,
|
||||
|
|
@ -16,11 +14,6 @@ mod resolver;
|
|||
mod sha;
|
||||
mod source;
|
||||
|
||||
/// Global authentication cache for a uv invocation.
|
||||
///
|
||||
/// This is used to share Git credentials within a single process.
|
||||
pub static GIT_STORE: LazyLock<GitStore> = LazyLock::new(GitStore::default);
|
||||
|
||||
/// A URL reference to a Git repository.
|
||||
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Hash, Ord)]
|
||||
pub struct GitUrl {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue