repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-auth/src/index.rs | crates/uv-auth/src/index.rs | use std::fmt::{self, Display, Formatter};
use rustc_hash::FxHashSet;
use url::Url;
use uv_redacted::DisplaySafeUrl;
/// When to use authentication.
#[derive(
Copy,
Clone,
Debug,
Default,
Hash,
Eq,
PartialEq,
Ord,
PartialOrd,
serde::Serialize,
serde::Deserialize,
)]
#[serde(... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-auth/src/store.rs | crates/uv-auth/src/store.rs | use std::ops::Deref;
use std::path::{Path, PathBuf};
use fs_err as fs;
use rustc_hash::FxHashMap;
use serde::{Deserialize, Serialize};
use thiserror::Error;
use uv_fs::{LockedFile, LockedFileError, LockedFileMode, with_added_extension};
use uv_preview::{Preview, PreviewFeatures};
use uv_redacted::DisplaySafeUrl;
use ... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-auth/src/access_token.rs | crates/uv-auth/src/access_token.rs | /// An encoded JWT access token.
#[derive(Debug, Clone, serde::Deserialize, serde::Serialize)]
#[serde(transparent)]
pub struct AccessToken(String);
impl AccessToken {
/// Return the [`AccessToken`] as a vector of bytes.
pub fn into_bytes(self) -> Vec<u8> {
self.0.into_bytes()
}
/// Return the... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-auth/src/pyx.rs | crates/uv-auth/src/pyx.rs | use std::io;
use std::path::{Path, PathBuf};
use std::time::Duration;
use base64::Engine;
use base64::prelude::BASE64_URL_SAFE_NO_PAD;
use etcetera::BaseStrategy;
use reqwest_middleware::ClientWithMiddleware;
use tracing::debug;
use url::Url;
use uv_cache_key::CanonicalUrl;
use uv_redacted::{DisplaySafeUrl, DisplaySa... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-auth/src/middleware.rs | crates/uv-auth/src/middleware.rs | use std::sync::{Arc, LazyLock};
use anyhow::{anyhow, format_err};
use http::{Extensions, StatusCode};
use netrc::Netrc;
use reqwest::{Request, Response};
use reqwest_middleware::{ClientWithMiddleware, Error, Middleware, Next};
use tokio::sync::Mutex;
use tracing::{debug, trace, warn};
use uv_preview::{Preview, Previe... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | true |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-auth/src/service.rs | crates/uv-auth/src/service.rs | use serde::{Deserialize, Serialize};
use std::str::FromStr;
use thiserror::Error;
use url::Url;
use uv_redacted::{DisplaySafeUrl, DisplaySafeUrlError};
#[derive(Error, Debug)]
pub enum ServiceParseError {
#[error(transparent)]
InvalidUrl(#[from] DisplaySafeUrlError),
#[error("Unsupported scheme: {0}")]
... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-auth/src/realm.rs | crates/uv-auth/src/realm.rs | use std::hash::{Hash, Hasher};
use std::{fmt::Display, fmt::Formatter};
use url::Url;
use uv_redacted::DisplaySafeUrl;
use uv_small_str::SmallString;
/// Used to determine if authentication information should be retained on a new URL.
/// Based on the specification defined in RFC 7235 and 7230.
///
/// <https://datatr... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-auth/src/credentials.rs | crates/uv-auth/src/credentials.rs | use std::borrow::Cow;
use std::fmt;
use std::io::Read;
use std::io::Write;
use std::str::FromStr;
use base64::prelude::BASE64_STANDARD;
use base64::read::DecoderReader;
use base64::write::EncoderWriter;
use http::Uri;
use netrc::Netrc;
use reqsign::aws::DefaultSigner;
use reqwest::Request;
use reqwest::header::HeaderV... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-auth/src/keyring.rs | crates/uv-auth/src/keyring.rs | use std::{io::Write, process::Stdio};
use tokio::process::Command;
use tracing::{debug, instrument, trace, warn};
use uv_redacted::DisplaySafeUrl;
use uv_warnings::warn_user_once;
use crate::credentials::Credentials;
/// Service name prefix for storing credentials in a keyring.
static UV_SERVICE_PREFIX: &str = "uv:";... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-auth/src/cache.rs | crates/uv-auth/src/cache.rs | use std::fmt::Display;
use std::fmt::Formatter;
use std::hash::BuildHasherDefault;
use std::sync::Arc;
use std::sync::RwLock;
use rustc_hash::{FxHashMap, FxHasher};
use tracing::trace;
use url::Url;
use uv_once_map::OnceMap;
use uv_redacted::DisplaySafeUrl;
use crate::credentials::{Authentication, Username};
use cra... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-auth/src/providers.rs | crates/uv-auth/src/providers.rs | use std::borrow::Cow;
use std::sync::LazyLock;
use reqsign::aws::DefaultSigner;
use tracing::debug;
use url::Url;
use uv_preview::{Preview, PreviewFeatures};
use uv_static::EnvVars;
use uv_warnings::warn_user_once;
use crate::Credentials;
use crate::credentials::Token;
use crate::realm::{Realm, RealmRef};
/// The [... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pep508/src/verbatim_url.rs | crates/uv-pep508/src/verbatim_url.rs | use std::borrow::Cow;
use std::cmp::Ordering;
use std::fmt::{Debug, Display};
use std::hash::Hash;
use std::ops::Deref;
use std::path::{Path, PathBuf};
use std::sync::LazyLock;
use arcstr::ArcStr;
use regex::Regex;
use thiserror::Error;
use url::Url;
use uv_cache_key::{CacheKey, CacheKeyHasher};
#[cfg_attr(not(featur... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pep508/src/cursor.rs | crates/uv-pep508/src/cursor.rs | use std::fmt::{Display, Formatter};
use std::str::Chars;
use crate::{Pep508Error, Pep508ErrorSource, Pep508Url};
/// A [`Cursor`] over a string.
#[derive(Debug, Clone)]
pub(crate) struct Cursor<'a> {
input: &'a str,
chars: Chars<'a>,
pos: usize,
}
impl<'a> Cursor<'a> {
/// Convert from `&str`.
pu... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pep508/src/lib.rs | crates/uv-pep508/src/lib.rs | //! A library for [dependency specifiers](https://packaging.python.org/en/latest/specifications/dependency-specifiers/)
//! previously known as [PEP 508](https://peps.python.org/pep-0508/)
//!
//! ## Usage
//!
//! ```
//! use std::str::FromStr;
//! use uv_pep508::{Requirement, VerbatimUrl};
//! use uv_normalize::ExtraN... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | true |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pep508/src/origin.rs | crates/uv-pep508/src/origin.rs | use std::path::{Path, PathBuf};
use uv_normalize::{GroupName, PackageName};
/// The origin of a dependency, e.g., a `-r requirements.txt` file.
#[derive(
Hash, Debug, Clone, Eq, PartialEq, PartialOrd, Ord, serde::Serialize, serde::Deserialize,
)]
#[serde(rename_all = "kebab-case")]
pub enum RequirementOrigin {
... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pep508/src/unnamed.rs | crates/uv-pep508/src/unnamed.rs | use std::fmt::{Debug, Display, Formatter};
use std::hash::Hash;
use std::path::Path;
use std::str::FromStr;
use uv_fs::normalize_url_path;
use uv_normalize::ExtraName;
use crate::marker::parse;
use crate::{
Cursor, MarkerEnvironment, MarkerTree, Pep508Error, Pep508ErrorSource, Pep508Url, Reporter,
Requirement... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pep508/src/marker/environment.rs | crates/uv-pep508/src/marker/environment.rs | use std::sync::Arc;
use uv_pep440::{Version, VersionParseError};
use crate::{CanonicalMarkerValueString, CanonicalMarkerValueVersion, StringVersion};
/// The marker values for a python interpreter, normally the current one
///
/// <https://packaging.python.org/en/latest/specifications/dependency-specifiers/#environm... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pep508/src/marker/parse.rs | crates/uv-pep508/src/marker/parse.rs | use arcstr::ArcStr;
use std::str::FromStr;
use uv_normalize::{ExtraName, GroupName};
use uv_pep440::{Version, VersionPattern, VersionSpecifier};
use crate::cursor::Cursor;
use crate::marker::MarkerValueExtra;
use crate::marker::lowering::CanonicalMarkerListPair;
use crate::marker::tree::{ContainerOperator, MarkerValue... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pep508/src/marker/algebra.rs | crates/uv-pep508/src/marker/algebra.rs | //! This module implements marker tree operations using Algebraic Decision Diagrams (ADD).
//!
//! An ADD is a tree of decision nodes as well as two terminal nodes, `true` and `false`. Marker
//! variables are represented as decision nodes. The edge from a decision node to it's child
//! represents a particular assignm... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | true |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pep508/src/marker/simplify.rs | crates/uv-pep508/src/marker/simplify.rs | use std::fmt;
use std::ops::Bound;
use arcstr::ArcStr;
use indexmap::IndexMap;
use itertools::Itertools;
use rustc_hash::FxBuildHasher;
use version_ranges::Ranges;
use uv_pep440::{Version, VersionSpecifier};
use crate::marker::tree::ContainerOperator;
use crate::{ExtraOperator, MarkerExpression, MarkerOperator, Mark... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pep508/src/marker/tree.rs | crates/uv-pep508/src/marker/tree.rs | use std::borrow::Cow;
use std::cmp::Ordering;
use std::fmt::{self, Display, Formatter};
use std::ops::{Bound, Deref};
use std::str::FromStr;
use arcstr::ArcStr;
use itertools::Itertools;
use serde::{Deserialize, Deserializer, Serialize, Serializer, de};
use version_ranges::Ranges;
use uv_normalize::{ExtraName, GroupN... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | true |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pep508/src/marker/mod.rs | crates/uv-pep508/src/marker/mod.rs | //! PEP 508 markers implementations with validation and warnings
//!
//! Markers allow you to install dependencies only in specific environments (python version,
//! operating system, architecture, etc.) or when a specific feature is activated. E.g. you can
//! say `importlib-metadata ; python_version < "3.8"` or
//! `... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pep508/src/marker/lowering.rs | crates/uv-pep508/src/marker/lowering.rs | use std::fmt::{Display, Formatter};
use uv_normalize::{ExtraName, GroupName};
use crate::marker::tree::MarkerValueList;
use crate::{MarkerValueExtra, MarkerValueString, MarkerValueVersion};
/// Those environment markers with a PEP 440 version as value such as `python_version`
#[derive(Copy, Clone, Debug, Eq, Hash, P... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-platform-tags/src/abi_tag.rs | crates/uv-platform-tags/src/abi_tag.rs | use std::fmt::Formatter;
use std::str::FromStr;
/// A tag to represent the ABI compatibility of a Python distribution.
///
/// This is the second segment in the wheel filename, following the language tag. For example,
/// in `cp39-none-manylinux_2_24_x86_64.whl`, the ABI tag is `none`.
#[derive(
Debug,
Copy,
... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-platform-tags/src/lib.rs | crates/uv-platform-tags/src/lib.rs | pub use abi_tag::{AbiTag, ParseAbiTagError};
pub use language_tag::{LanguageTag, ParseLanguageTagError};
pub use platform::{Arch, Os, Platform, PlatformError};
pub use platform_tag::{ParsePlatformTagError, PlatformTag};
pub use tags::{BinaryFormat, IncompatibleTag, TagCompatibility, TagPriority, Tags, TagsError};
mod ... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-platform-tags/src/platform.rs | crates/uv-platform-tags/src/platform.rs | //! Abstractions for understanding the current platform (operating system and architecture).
use std::str::FromStr;
use std::{fmt, io};
use thiserror::Error;
#[derive(Error, Debug)]
pub enum PlatformError {
#[error(transparent)]
IOError(#[from] io::Error),
#[error("Failed to detect the operating system v... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-platform-tags/src/platform_tag.rs | crates/uv-platform-tags/src/platform_tag.rs | use std::fmt::Formatter;
use std::str::FromStr;
use uv_small_str::SmallString;
use crate::tags::AndroidAbi;
use crate::tags::IosMultiarch;
use crate::{Arch, BinaryFormat};
/// A tag to represent the platform compatibility of a Python distribution.
///
/// This is the third segment in the wheel filename, following th... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | true |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-platform-tags/src/language_tag.rs | crates/uv-platform-tags/src/language_tag.rs | use std::fmt::Formatter;
use std::str::FromStr;
/// A tag to represent the language and implementation of the Python interpreter.
///
/// This is the first segment in the wheel filename. For example, in `cp39-none-manylinux_2_24_x86_64.whl`,
/// the language tag is `cp39`.
#[derive(
Debug,
Copy,
Clone,
... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-platform-tags/src/tags.rs | crates/uv-platform-tags/src/tags.rs | use std::collections::BTreeSet;
use std::fmt::Formatter;
use std::str::FromStr;
use std::sync::Arc;
use std::{cmp, num::NonZeroU32};
use rustc_hash::FxHashMap;
use uv_small_str::SmallString;
use crate::{AbiTag, Arch, LanguageTag, Os, Platform, PlatformError, PlatformTag};
#[derive(Debug, thiserror::Error)]
pub enum... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | true |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-cli/build.rs | crates/uv-cli/build.rs | use std::{
path::{Path, PathBuf},
process::Command,
};
use fs_err as fs;
use uv_static::EnvVars;
fn main() {
// The workspace root directory is not available without walking up the tree
// https://github.com/rust-lang/cargo/issues/3946
let workspace_root = Path::new(&std::env::var(EnvVars::CARGO_... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-cli/src/lib.rs | crates/uv-cli/src/lib.rs | use std::ffi::OsString;
use std::fmt::{self, Display, Formatter};
use std::ops::{Deref, DerefMut};
use std::path::PathBuf;
use std::str::FromStr;
use anyhow::{Result, anyhow};
use clap::builder::styling::{AnsiColor, Effects, Style};
use clap::builder::{PossibleValue, Styles, TypedValueParser, ValueParserFactory};
use ... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | true |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-cli/src/version.rs | crates/uv-cli/src/version.rs | //! Code for representing uv's release version number.
// See also <https://github.com/astral-sh/ruff/blob/8118d29419055b779719cc96cdf3dacb29ac47c9/crates/ruff/src/version.rs>
use std::fmt;
use serde::Serialize;
use uv_normalize::PackageName;
use uv_pep508::uv_pep440::Version;
/// Information about the git repositor... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-cli/src/comma.rs | crates/uv-cli/src/comma.rs | use std::str::FromStr;
/// A comma-separated string of requirements, e.g., `"flask,anyio"`, that takes extras into account
/// (i.e., treats `"psycopg[binary,pool]"` as a single requirement).
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct CommaSeparatedRequirements(Vec<String>);
impl IntoIte... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-cli/src/options.rs | crates/uv-cli/src/options.rs | use anstream::eprintln;
use uv_cache::Refresh;
use uv_configuration::{BuildIsolation, Reinstall, Upgrade};
use uv_distribution_types::{ConfigSettings, PackageConfigSettings, Requirement};
use uv_resolver::{ExcludeNewer, ExcludeNewerPackage, PrereleaseMode};
use uv_settings::{Combine, PipOptions, ResolverInstallerOptio... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-cli/src/compat.rs | crates/uv-cli/src/compat.rs | use anyhow::{Result, anyhow};
use clap::{Args, ValueEnum};
use uv_warnings::warn_user;
pub trait CompatArgs {
fn validate(&self) -> Result<()>;
}
/// Arguments for `pip-compile` compatibility.
///
/// These represent a subset of the `pip-compile` interface that uv supports by default.
/// For example, users ofte... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-build-backend/src/settings.rs | crates/uv-build-backend/src/settings.rs | use serde::{Deserialize, Serialize};
use std::path::{Path, PathBuf};
use uv_macros::OptionsMetadata;
/// Settings for the uv build backend (`uv_build`).
///
/// Note that those settings only apply when using the `uv_build` backend, other build backends
/// (such as hatchling) have their own configuration.
///
/// All ... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-build-backend/src/lib.rs | crates/uv-build-backend/src/lib.rs | use itertools::Itertools;
mod metadata;
mod serde_verbatim;
mod settings;
mod source_dist;
mod wheel;
pub use metadata::{PyProjectToml, check_direct_build};
pub use settings::{BuildBackendSettings, WheelDataIncludes};
pub use source_dist::{build_source_dist, list_source_dist};
use uv_warnings::warn_user_once;
pub use ... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | true |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-build-backend/src/source_dist.rs | crates/uv-build-backend/src/source_dist.rs | use crate::metadata::DEFAULT_EXCLUDES;
use crate::wheel::build_exclude_matcher;
use crate::{
BuildBackendSettings, DirectoryWriter, Error, FileList, ListWriter, PyProjectToml,
error_on_venv, find_roots,
};
use flate2::Compression;
use flate2::write::GzEncoder;
use fs_err::File;
use globset::{Glob, GlobSet};
use... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-build-backend/src/wheel.rs | crates/uv-build-backend/src/wheel.rs | use base64::{Engine, prelude::BASE64_URL_SAFE_NO_PAD as base64};
use fs_err::File;
use globset::{GlobSet, GlobSetBuilder};
use itertools::Itertools;
use rustc_hash::FxHashSet;
use sha2::{Digest, Sha256};
use std::io::{BufReader, Read, Write};
use std::path::{Component, Path, PathBuf};
use std::{io, mem};
use tracing::{... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-build-backend/src/metadata.rs | crates/uv-build-backend/src/metadata.rs | use std::collections::{BTreeMap, Bound};
use std::ffi::OsStr;
use std::fmt::Display;
use std::fmt::Write;
use std::path::{Path, PathBuf};
use std::str::{self, FromStr};
use itertools::Itertools;
use serde::{Deserialize, Deserializer};
use tracing::{debug, trace, warn};
use version_ranges::Ranges;
use walkdir::WalkDir;... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | true |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-build-backend/src/serde_verbatim.rs | crates/uv-build-backend/src/serde_verbatim.rs | use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::fmt::{Display, Formatter};
use std::ops::Deref;
use std::str::FromStr;
/// Preserves the verbatim string representation when deserializing `T`.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub(crate) struct SerdeVerbatim<T> {
... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-version/src/lib.rs | crates/uv-version/src/lib.rs | /// Return the application version.
///
/// This should be in sync with uv's version based on the Crate version.
pub fn version() -> &'static str {
env!("CARGO_PKG_VERSION")
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_get_version() {
assert_eq!(version().to_string(), env!("CARGO_P... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-workspace/src/pyproject.rs | crates/uv-workspace/src/pyproject.rs | //! Reads the following fields from `pyproject.toml`:
//!
//! * `project.{dependencies,optional-dependencies}`
//! * `tool.uv.sources`
//! * `tool.uv.workspace`
//!
//! Then lowers them into a dependency specification.
#[cfg(feature = "schemars")]
use std::borrow::Cow;
use std::collections::BTreeMap;
use std::fmt::For... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | true |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-workspace/src/workspace.rs | crates/uv-workspace/src/workspace.rs | //! Resolve the current [`ProjectWorkspace`] or [`Workspace`].
use std::collections::{BTreeMap, BTreeSet};
use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex};
use glob::{GlobError, PatternError, glob};
use itertools::Itertools;
use rustc_hash::{FxHashMap, FxHashSet};
use tracing::{debug, trace, warn};
use u... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | true |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-workspace/src/lib.rs | crates/uv-workspace/src/lib.rs | pub use workspace::{
DiscoveryOptions, Editability, MemberDiscovery, ProjectDiscovery, ProjectWorkspace,
RequiresPythonSources, VirtualProject, Workspace, WorkspaceCache, WorkspaceError,
WorkspaceMember,
};
pub mod dependency_groups;
pub mod pyproject;
pub mod pyproject_mut;
mod workspace;
| rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-workspace/src/pyproject_mut.rs | crates/uv-workspace/src/pyproject_mut.rs | use std::fmt::{Display, Formatter};
use std::path::Path;
use std::str::FromStr;
use std::{fmt, iter, mem};
use itertools::Itertools;
use serde::{Deserialize, Serialize};
use thiserror::Error;
use toml_edit::{
Array, ArrayOfTables, DocumentMut, Formatted, Item, RawString, Table, TomlError, Value,
};
use uv_cache_k... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | true |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-workspace/src/dependency_groups.rs | crates/uv-workspace/src/dependency_groups.rs | use std::collections::btree_map::Entry;
use std::str::FromStr;
use std::{collections::BTreeMap, path::Path};
use thiserror::Error;
use tracing::error;
use uv_distribution_types::RequiresPython;
use uv_fs::Simplified;
use uv_normalize::{DEV_DEPENDENCIES, GroupName};
use uv_pep440::VersionSpecifiers;
use uv_pep508::Pep... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-cache-info/src/lib.rs | crates/uv-cache-info/src/lib.rs | pub use crate::cache_info::*;
pub use crate::timestamp::*;
mod cache_info;
mod git_info;
mod glob;
mod timestamp;
| rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-cache-info/src/timestamp.rs | crates/uv-cache-info/src/timestamp.rs | use serde::{Deserialize, Serialize};
use std::path::Path;
/// A timestamp used to measure changes to a file.
///
/// On Unix, this uses `ctime` as a conservative approach. `ctime` should detect all
/// modifications, including some that we don't care about, like hardlink modifications.
/// On other platforms, it uses ... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-cache-info/src/git_info.rs | crates/uv-cache-info/src/git_info.rs | use std::collections::BTreeMap;
use std::path::{Path, PathBuf};
use tracing::warn;
use walkdir::WalkDir;
#[derive(Debug, thiserror::Error)]
pub(crate) enum GitInfoError {
#[error("The repository at {0} is missing a `.git` directory")]
MissingGitDir(PathBuf),
#[error("The repository at {0} is missing a `HE... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-cache-info/src/glob.rs | crates/uv-cache-info/src/glob.rs | use std::{
collections::BTreeMap,
path::{Component, Components, Path, PathBuf},
};
/// Check if a component of the path looks like it may be a glob pattern.
///
/// Note: this function is being used when splitting a glob pattern into a long possible
/// base and the glob remainder (scanning through components ... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-cache-info/src/cache_info.rs | crates/uv-cache-info/src/cache_info.rs | use std::borrow::Cow;
use std::collections::BTreeMap;
use std::path::{Path, PathBuf};
use serde::Deserialize;
use tracing::{debug, warn};
use uv_fs::Simplified;
use crate::git_info::{Commit, Tags};
use crate::glob::cluster_globs;
use crate::timestamp::Timestamp;
#[derive(Debug, thiserror::Error)]
pub enum CacheInfo... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-trampoline/build.rs | crates/uv-trampoline/build.rs | // This embeds a "manifest" - a special XML document - into our built binary.
// The main things it does is tell Windows that we want to use the magic
// utf8 codepage, so we can use the *A versions of Windows API functions and
// don't have to mess with utf-16.
use embed_manifest::{embed_manifest, new_manifest};
use ... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-trampoline/src/diagnostics.rs | crates/uv-trampoline/src/diagnostics.rs | use std::convert::Infallible;
use std::ffi::CString;
use std::io::Write;
use std::os::windows::io::AsRawHandle;
use std::string::String;
use ufmt_write::uWrite;
use windows::Win32::UI::WindowsAndMessaging::{MESSAGEBOX_STYLE, MessageBoxA};
use windows::core::PCSTR;
#[macro_export]
macro_rules! error {
($($tt:tt)*)... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-trampoline/src/lib.rs | crates/uv-trampoline/src/lib.rs | pub mod bounce;
mod diagnostics;
| rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-trampoline/src/bounce.rs | crates/uv-trampoline/src/bounce.rs | #![allow(clippy::disallowed_types)]
use std::ffi::{CString, c_void};
use std::path::{Path, PathBuf};
use std::vec::Vec;
use windows::Win32::Foundation::{LPARAM, WPARAM};
use windows::Win32::{
Foundation::{
CloseHandle, HANDLE, HANDLE_FLAG_INHERIT, INVALID_HANDLE_VALUE, SetHandleInformation, TRUE,
},
... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-trampoline/src/bin/uv-trampoline-gui.rs | crates/uv-trampoline/src/bin/uv-trampoline-gui.rs | #![no_main] // disable all rust entry points, requires enabling compiler-builtins-mem
#![windows_subsystem = "windows"] // configures /SUBSYSTEM:WINDOWS
// Named according to https://docs.microsoft.com/en-us/cpp/build/reference/entry-entry-point-symbol
// This avoids having to define a custom /ENTRY:entry_fn in build.... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-trampoline/src/bin/uv-trampoline-console.rs | crates/uv-trampoline/src/bin/uv-trampoline-console.rs | #![no_main] // disable all rust entry points, requires enabling compiler-builtins-mem
#![windows_subsystem = "console"] // configures /SUBSYSTEM:CONSOLE
// Named according to https://docs.microsoft.com/en-us/cpp/build/reference/entry-entry-point-symbol
// This avoids having to define a custom /ENTRY:entry_fn in build.... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-once-map/src/lib.rs | crates/uv-once-map/src/lib.rs | use std::borrow::Borrow;
use std::fmt::{Debug, Formatter};
use std::hash::{BuildHasher, Hash, RandomState};
use std::pin::pin;
use std::sync::Arc;
use dashmap::DashMap;
use tokio::sync::Notify;
/// Run tasks only once and store the results in a parallel hash map.
///
/// We often have jobs `Fn(K) -> V` that we only w... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-keyring/src/blocking.rs | crates/uv-keyring/src/blocking.rs | use crate::error::{Error as ErrorCode, Result};
pub(crate) async fn spawn_blocking<F, T>(f: F) -> Result<T>
where
F: FnOnce() -> Result<T> + Send + 'static,
T: Send + 'static,
{
tokio::task::spawn_blocking(f)
.await
.map_err(|e| ErrorCode::PlatformFailure(Box::new(e)))?
}
| rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-keyring/src/lib.rs | crates/uv-keyring/src/lib.rs | #![cfg_attr(docsrs, feature(doc_cfg))]
/*!
# Keyring
This is a cross-platform library that does storage and retrieval of passwords
(or other secrets) in an underlying platform-specific secure credential store.
A top-level introduction to the library's usage, as well as a small code sample,
may be found in [the librar... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-keyring/src/macos.rs | crates/uv-keyring/src/macos.rs | /*!
# macOS Keychain credential store
All credentials on macOS are stored in secure stores called _keychains_.
The OS automatically creates three of them that live on filesystem,
called _User_ (aka login), _Common_, and _System_. In addition, removable
media can contain a keychain which can be registered under the na... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-keyring/src/error.rs | crates/uv-keyring/src/error.rs | /*!
Platform-independent error model.
There is an escape hatch here for surfacing platform-specific
error information returned by the platform-specific storage provider,
but the concrete objects returned must be `Send` so they can be
moved from one thread to another. (Since most platform errors
are integer error code... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-keyring/src/windows.rs | crates/uv-keyring/src/windows.rs | /*!
# Windows Credential Manager credential store
This module uses Windows Generic credentials to store entries.
These are identified by a single string (called their _target name_).
They also have a number of non-identifying but manipulable attributes:
a _username_, a _comment_, and a _target alias_.
For a given <_... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-keyring/src/secret_service.rs | crates/uv-keyring/src/secret_service.rs | /*!
# secret-service credential store
Items in the secret-service are identified by an arbitrary collection
of attributes. This implementation controls the following attributes:
- `target` (optional & taken from entry creation call, defaults to `default`)
- `service` (required & taken from entry creation call)
- `u... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | true |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-keyring/src/mock.rs | crates/uv-keyring/src/mock.rs | /*!
# Mock credential store
To facilitate testing of clients, this crate provides a Mock credential store
that is platform-independent, provides no persistence, and allows the client
to specify the return values (including errors) for each call. The credentials
in this store have no attributes at all.
To use this cr... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-keyring/src/credential.rs | crates/uv-keyring/src/credential.rs | /*!
# Platform-independent secure storage model
This module defines a plug and play model for platform-specific credential stores.
The model comprises two traits: [`CredentialBuilderApi`] for the underlying store
and [`CredentialApi`] for the entries in the store. These traits must be implemented
in a thread-safe wa... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-keyring/tests/threading.rs | crates/uv-keyring/tests/threading.rs | #![cfg(feature = "native-auth")]
use common::{generate_random_string, init_logger};
use uv_keyring::{Entry, Error};
mod common;
#[tokio::test]
async fn test_create_then_move() {
init_logger();
let name = generate_random_string();
let entry = Entry::new(&name, &name).unwrap();
let handle = tokio::sp... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-keyring/tests/basic.rs | crates/uv-keyring/tests/basic.rs | #![cfg(feature = "native-auth")]
use common::{generate_random_bytes_of_len, generate_random_string, init_logger};
use uv_keyring::{Entry, Error};
mod common;
#[tokio::test]
async fn test_missing_entry() {
init_logger();
let name = generate_random_string();
let entry = Entry::new(&name, &name).expect("Ca... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-keyring/tests/common/mod.rs | crates/uv-keyring/tests/common/mod.rs | #![allow(dead_code)] // not all of these utilities are used by all tests
/// When tests fail, they leave keys behind, and those keys
/// have to be cleaned up before the tests can be run again
/// in order to avoid bad results. So it's a lot easier just
/// to have tests use a random string for key names to avoid
///... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-tool/src/lib.rs | crates/uv-tool/src/lib.rs | use std::io::{self, Write};
use std::path::{Path, PathBuf};
use std::str::FromStr;
use fs_err as fs;
use fs_err::File;
use thiserror::Error;
use tracing::{debug, warn};
use uv_cache::Cache;
use uv_dirs::user_executable_directory;
use uv_fs::{LockedFile, LockedFileError, LockedFileMode, Simplified};
use uv_install_whe... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-tool/src/receipt.rs | crates/uv-tool/src/receipt.rs | use std::path::Path;
use serde::Deserialize;
use crate::Tool;
/// A `uv-receipt.toml` file tracking the installation of a tool.
#[allow(dead_code)]
#[derive(Debug, Clone, Deserialize)]
pub struct ToolReceipt {
pub(crate) tool: Tool,
/// The raw unserialized document.
#[serde(skip)]
pub(crate) raw: S... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-tool/src/tool.rs | crates/uv-tool/src/tool.rs | use std::fmt::{self, Display, Formatter};
use std::path::PathBuf;
use serde::Deserialize;
use toml_edit::{Array, Item, Table, Value, value};
use uv_distribution_types::Requirement;
use uv_fs::{PortablePath, Simplified};
use uv_pypi_types::VerbatimParsedUrl;
use uv_python::PythonRequest;
use uv_settings::ToolOptions;
... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/lib.rs | crates/uv-distribution/src/lib.rs | pub use distribution_database::{DistributionDatabase, HttpArchivePointer, LocalArchivePointer};
pub use download::LocalWheel;
pub use error::Error;
pub use index::{BuiltWheelIndex, RegistryWheelIndex};
pub use metadata::{
ArchiveMetadata, BuildRequires, FlatRequiresDist, LoweredExtraBuildDependencies,
LoweredRe... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/download.rs | crates/uv-distribution/src/download.rs | use std::path::Path;
use uv_cache_info::CacheInfo;
use uv_distribution_filename::WheelFilename;
use uv_distribution_types::{BuildInfo, CachedDist, Dist, Hashed};
use uv_metadata::read_flat_wheel_metadata;
use uv_pypi_types::{HashDigest, HashDigests, ResolutionMetadata};
use crate::Error;
/// A locally available whee... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/archive.rs | crates/uv-distribution/src/archive.rs | use uv_cache::{ARCHIVE_VERSION, ArchiveId, Cache};
use uv_distribution_filename::WheelFilename;
use uv_distribution_types::Hashed;
use uv_pypi_types::{HashDigest, HashDigests};
/// An archive (unzipped wheel) that exists in the local cache.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct Archi... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/error.rs | crates/uv-distribution/src/error.rs | use std::path::PathBuf;
use owo_colors::OwoColorize;
use tokio::task::JoinError;
use zip::result::ZipError;
use crate::metadata::MetadataError;
use uv_cache::Error as CacheError;
use uv_client::WrappedReqwestError;
use uv_distribution_filename::{WheelFilename, WheelFilenameError};
use uv_distribution_types::{Installe... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/reporter.rs | crates/uv-distribution/src/reporter.rs | use std::sync::Arc;
use uv_distribution_types::BuildableSource;
use uv_normalize::PackageName;
use uv_redacted::DisplaySafeUrl;
pub trait Reporter: Send + Sync {
/// Callback to invoke when a source distribution build is kicked off.
fn on_build_start(&self, source: &BuildableSource) -> usize;
/// Callbac... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/distribution_database.rs | crates/uv-distribution/src/distribution_database.rs | use std::future::Future;
use std::io;
use std::path::Path;
use std::pin::Pin;
use std::sync::Arc;
use std::task::{Context, Poll};
use futures::{FutureExt, TryStreamExt};
use tempfile::TempDir;
use tokio::io::{AsyncRead, AsyncSeekExt, ReadBuf};
use tokio::sync::Semaphore;
use tokio_util::compat::FuturesAsyncReadCompatE... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | true |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/index/built_wheel_index.rs | crates/uv-distribution/src/index/built_wheel_index.rs | use std::borrow::Cow;
use uv_cache::{Cache, CacheBucket, CacheShard, WheelCache};
use uv_cache_info::CacheInfo;
use uv_distribution_types::{
BuildInfo, BuildVariables, ConfigSettings, DirectUrlSourceDist, DirectorySourceDist,
ExtraBuildRequirement, ExtraBuildRequires, ExtraBuildVariables, GitSourceDist, Hashed... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/index/registry_wheel_index.rs | crates/uv-distribution/src/index/registry_wheel_index.rs | use std::borrow::Cow;
use std::collections::hash_map::Entry;
use rustc_hash::{FxHashMap, FxHashSet};
use uv_cache::{Cache, CacheBucket, WheelCache};
use uv_cache_info::CacheInfo;
use uv_distribution_types::{
BuildInfo, BuildVariables, CachedRegistryDist, ConfigSettings, ExtraBuildRequirement,
ExtraBuildRequir... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/index/mod.rs | crates/uv-distribution/src/index/mod.rs | pub use built_wheel_index::BuiltWheelIndex;
pub use registry_wheel_index::RegistryWheelIndex;
mod built_wheel_index;
mod cached_wheel;
mod registry_wheel_index;
| rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/index/cached_wheel.rs | crates/uv-distribution/src/index/cached_wheel.rs | use std::path::Path;
use uv_cache::{Cache, CacheBucket, CacheEntry};
use uv_cache_info::CacheInfo;
use uv_distribution_filename::WheelFilename;
use uv_distribution_types::{
BuildInfo, CachedDirectUrlDist, CachedRegistryDist, DirectUrlSourceDist, DirectorySourceDist,
GitSourceDist, Hashed, PathSourceDist,
};
us... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/metadata/build_requires.rs | crates/uv-distribution/src/metadata/build_requires.rs | use std::collections::BTreeMap;
use std::path::Path;
use uv_auth::CredentialsCache;
use uv_configuration::SourceStrategy;
use uv_distribution_types::{
ExtraBuildRequirement, ExtraBuildRequires, IndexLocations, Requirement,
};
use uv_normalize::PackageName;
use uv_workspace::pyproject::{ExtraBuildDependencies, Extra... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/metadata/mod.rs | crates/uv-distribution/src/metadata/mod.rs | use std::collections::BTreeMap;
use std::path::{Path, PathBuf};
use thiserror::Error;
use uv_auth::CredentialsCache;
use uv_configuration::SourceStrategy;
use uv_distribution_types::{GitSourceUrl, IndexLocations, Requirement};
use uv_normalize::{ExtraName, GroupName, PackageName};
use uv_pep440::{Version, VersionSpeci... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/metadata/lowering.rs | crates/uv-distribution/src/metadata/lowering.rs | use std::collections::BTreeMap;
use std::io;
use std::path::{Path, PathBuf};
use either::Either;
use thiserror::Error;
use uv_auth::CredentialsCache;
use uv_distribution_filename::DistExtension;
use uv_distribution_types::{
Index, IndexLocations, IndexMetadata, IndexName, Origin, Requirement, RequirementSource,
};... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | true |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/metadata/dependency_groups.rs | crates/uv-distribution/src/metadata/dependency_groups.rs | use std::collections::BTreeMap;
use std::path::{Path, PathBuf};
use uv_auth::CredentialsCache;
use uv_configuration::SourceStrategy;
use uv_distribution_types::{IndexLocations, Requirement};
use uv_normalize::{GroupName, PackageName};
use uv_workspace::dependency_groups::FlatDependencyGroups;
use uv_workspace::pyprojec... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/metadata/requires_dist.rs | crates/uv-distribution/src/metadata/requires_dist.rs | use std::collections::{BTreeMap, VecDeque};
use std::path::Path;
use std::slice;
use rustc_hash::FxHashSet;
use uv_auth::CredentialsCache;
use uv_configuration::SourceStrategy;
use uv_distribution_types::{IndexLocations, Requirement};
use uv_normalize::{ExtraName, GroupName, PackageName};
use uv_pep508::MarkerTree;
us... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/source/revision.rs | crates/uv-distribution/src/source/revision.rs | use serde::{Deserialize, Serialize};
use std::path::Path;
use uv_distribution_types::Hashed;
use uv_pypi_types::{HashDigest, HashDigests};
/// The [`Revision`] is a thin wrapper around a unique identifier for the source distribution.
///
/// A revision represents a unique version of a source distribution, at a level ... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/source/mod.rs | crates/uv-distribution/src/source/mod.rs | //! Fetch and build source distributions from remote sources.
// This is to squash warnings about `|r| r.into_git_reporter()`. Clippy wants
// me to eta-reduce that and write it as
// `<(dyn reporter::Reporter + 'static)>::into_git_reporter`
// instead. But that's a monster. On the other hand, applying this suppressio... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | true |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-distribution/src/source/built_wheel_metadata.rs | crates/uv-distribution/src/source/built_wheel_metadata.rs | use std::path::{Path, PathBuf};
use std::str::FromStr;
use uv_cache::CacheShard;
use uv_cache_info::CacheInfo;
use uv_distribution_filename::WheelFilename;
use uv_distribution_types::{BuildInfo, Hashed};
use uv_fs::files;
use uv_normalize::PackageName;
use uv_pep440::Version;
use uv_platform_tags::Tags;
use uv_pypi_ty... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pypi-types/src/supported_environments.rs | crates/uv-pypi-types/src/supported_environments.rs | use std::str::FromStr;
use serde::ser::SerializeSeq;
use uv_pep508::MarkerTree;
/// A list of supported marker environments.
#[derive(Debug, Default, Clone, Eq, PartialEq)]
pub struct SupportedEnvironments(Vec<MarkerTree>);
impl SupportedEnvironments {
/// Create a new [`SupportedEnvironments`] struct from a li... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pypi-types/src/lib.rs | crates/uv-pypi-types/src/lib.rs | pub use base_url::*;
pub use conflicts::*;
pub use dependency_groups::*;
pub use direct_url::*;
pub use identifier::*;
pub use lenient_requirement::*;
pub use marker_environment::*;
pub use metadata::*;
pub use parsed_url::*;
pub use scheme::*;
pub use simple_json::*;
pub use supported_environments::*;
mod base_url;
m... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pypi-types/src/simple_json.rs | crates/uv-pypi-types/src/simple_json.rs | use std::borrow::Cow;
use std::str::FromStr;
use jiff::Timestamp;
use rustc_hash::FxHashMap;
use serde::{Deserialize, Deserializer, Serialize};
use uv_normalize::{ExtraName, PackageName};
use uv_pep440::{Version, VersionSpecifiers, VersionSpecifiersParseError};
use uv_pep508::Requirement;
use uv_small_str::SmallStrin... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pypi-types/src/lenient_requirement.rs | crates/uv-pypi-types/src/lenient_requirement.rs | use regex::Regex;
use serde::{Deserialize, Deserializer, Serialize, de};
use std::borrow::Cow;
use std::str::FromStr;
use std::sync::LazyLock;
use tracing::warn;
use uv_pep440::{VersionSpecifiers, VersionSpecifiersParseError};
use uv_pep508::{Pep508Error, Pep508Url, Requirement};
use crate::VerbatimParsedUrl;
/// Ex... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pypi-types/src/parsed_url.rs | crates/uv-pypi-types/src/parsed_url.rs | use std::fmt::{Display, Formatter};
use std::path::{Path, PathBuf};
use thiserror::Error;
use url::Url;
use uv_cache_key::{CacheKey, CacheKeyHasher};
use uv_distribution_filename::{DistExtension, ExtensionError};
use uv_git_types::{GitUrl, GitUrlParseError};
use uv_pep508::{
Pep508Url, UnnamedRequirementUrl, Verb... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pypi-types/src/identifier.rs | crates/uv-pypi-types/src/identifier.rs | use serde::{Serialize, Serializer};
#[cfg(feature = "schemars")]
use std::borrow::Cow;
use std::fmt::Display;
use std::str::FromStr;
use thiserror::Error;
/// Simplified Python identifier.
///
/// We don't match Python's identifier rules
/// (<https://docs.python.org/3.13/reference/lexical_analysis.html#identifiers>) ... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pypi-types/src/conflicts.rs | crates/uv-pypi-types/src/conflicts.rs | use petgraph::{
algo::toposort,
graph::{DiGraph, NodeIndex},
};
use rustc_hash::{FxHashMap, FxHashSet};
#[cfg(feature = "schemars")]
use std::borrow::Cow;
use std::{collections::BTreeSet, hash::Hash, rc::Rc};
use uv_normalize::{ExtraName, GroupName, PackageName};
use crate::dependency_groups::{DependencyGroupS... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pypi-types/src/direct_url.rs | crates/uv-pypi-types/src/direct_url.rs | use std::collections::BTreeMap;
use std::path::Path;
use serde::{Deserialize, Serialize};
use uv_redacted::{DisplaySafeUrl, DisplaySafeUrlError};
/// Metadata for a distribution that was installed via a direct URL.
///
/// See: <https://packaging.python.org/en/latest/specifications/direct-url-data-structure/>
#[deriv... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
astral-sh/uv | https://github.com/astral-sh/uv/blob/2318e48e819080f37a002551035c2b1880a81a70/crates/uv-pypi-types/src/base_url.rs | crates/uv-pypi-types/src/base_url.rs | use serde::{Deserialize, Serialize};
use uv_redacted::DisplaySafeUrl;
#[derive(Debug, Clone, Hash, Eq, PartialEq, Serialize, Deserialize)]
pub struct BaseUrl(
#[serde(
serialize_with = "DisplaySafeUrl::serialize_internal",
deserialize_with = "DisplaySafeUrl::deserialize_internal"
)]
Display... | rust | Apache-2.0 | 2318e48e819080f37a002551035c2b1880a81a70 | 2026-01-04T15:31:58.679374Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.