From 8c5a0d374357f2729e0f2fd678df9a3c24d8255c Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 26 May 2026 14:54:41 +0200 Subject: [PATCH 01/11] Get hawk passing --- crates/uv-audit/src/types.rs | 2 +- crates/uv-auth/src/keyring.rs | 2 +- crates/uv-auth/src/store.rs | 8 +- crates/uv-bin-install/src/lib.rs | 4 +- crates/uv-build-backend/src/settings.rs | 2 +- crates/uv-build-frontend/src/lib.rs | 2 +- crates/uv-cache/src/archive.rs | 2 +- crates/uv-cache/src/lib.rs | 2 +- crates/uv-client/src/base_client.rs | 20 +- crates/uv-client/src/flat_index.rs | 2 +- crates/uv-client/src/retry.rs | 2 +- crates/uv-client/src/rkyvutil.rs | 4 +- .../uv-configuration/src/dependency_groups.rs | 2 +- crates/uv-configuration/src/extras.rs | 6 +- crates/uv-configuration/src/overrides.rs | 2 +- .../uv-configuration/src/package_options.rs | 2 +- crates/uv-configuration/src/target_triple.rs | 12 +- .../uv-distribution-filename/src/extension.rs | 2 +- .../uv-distribution-types/src/build_info.rs | 2 +- crates/uv-distribution-types/src/buildable.rs | 4 +- crates/uv-distribution-types/src/file.rs | 2 +- crates/uv-distribution-types/src/id.rs | 4 +- crates/uv-distribution-types/src/index.rs | 4 +- .../uv-distribution-types/src/index_name.rs | 2 +- crates/uv-distribution-types/src/installed.rs | 2 +- .../src/known_platform.rs | 2 +- crates/uv-distribution-types/src/lib.rs | 16 +- .../src/prioritized_distribution.rs | 4 +- .../uv-distribution-types/src/requirement.rs | 8 +- .../src/requires_python.rs | 4 +- .../src/status_code_strategy.rs | 2 +- crates/uv-distribution/src/download.rs | 4 +- .../src/metadata/build_requires.rs | 2 +- crates/uv-distribution/src/metadata/mod.rs | 4 +- .../src/metadata/requires_dist.rs | 2 +- crates/uv-git/src/source.rs | 6 +- crates/uv-install-wheel/src/linker.rs | 2 +- crates/uv-installer/src/preparer.rs | 2 +- crates/uv-installer/src/site_packages.rs | 2 +- crates/uv-keyring/src/error.rs | 2 +- crates/uv-keyring/src/lib.rs | 2 +- crates/uv-keyring/src/macos.rs | 6 +- crates/uv-netrc/src/lib.rs | 2 +- crates/uv-pep440/src/version.rs | 16 +- crates/uv-pep440/src/version_specifier.rs | 8 +- crates/uv-pep508/src/marker/environment.rs | 2 +- crates/uv-pep508/src/marker/lowering.rs | 2 +- crates/uv-pep508/src/marker/tree.rs | 12 +- crates/uv-pep508/src/verbatim_url.rs | 2 +- crates/uv-platform-tags/src/platform.rs | 2 +- crates/uv-platform/src/libc.rs | 2 +- crates/uv-platform/src/os.rs | 2 +- crates/uv-preview/src/lib.rs | 2 +- crates/uv-pypi-types/src/conflicts.rs | 6 +- crates/uv-pypi-types/src/identifier.rs | 2 +- crates/uv-python/src/discovery.rs | 4 +- crates/uv-python/src/downloads.rs | 20 +- crates/uv-python/src/implementation.rs | 4 +- crates/uv-python/src/installation.rs | 12 +- crates/uv-python/src/interpreter.rs | 26 +- crates/uv-python/src/managed.rs | 4 +- crates/uv-python/src/prefix.rs | 6 +- crates/uv-python/src/python_version.rs | 2 +- crates/uv-python/src/target.rs | 6 +- crates/uv-python/src/version_files.rs | 2 +- crates/uv-python/src/virtualenv.rs | 2 +- crates/uv-requirements-txt/src/requirement.rs | 2 +- crates/uv-requirements/src/source_tree.rs | 4 +- crates/uv-resolver/src/error.rs | 6 +- crates/uv-resolver/src/exclude_newer.rs | 12 +- crates/uv-resolver/src/exclusions.rs | 4 +- crates/uv-resolver/src/flat_index.rs | 8 +- crates/uv-resolver/src/lock/mod.rs | 10 +- crates/uv-resolver/src/manifest.rs | 4 +- crates/uv-resolver/src/preferences.rs | 9 +- crates/uv-resolver/src/python_requirement.rs | 16 +- crates/uv-resolver/src/resolver/index.rs | 4 +- crates/uv-resolver/src/resolver/provider.rs | 2 +- crates/uv-resolver/src/universal_marker.rs | 16 +- crates/uv-resolver/src/yanks.rs | 2 +- crates/uv-settings/src/lib.rs | 4 +- crates/uv-settings/src/settings.rs | 8 +- crates/uv-toml/src/lib.rs | 2 +- crates/uv-tool/src/lib.rs | 2 +- crates/uv-workspace/src/dependency_groups.rs | 4 +- crates/uv-workspace/src/pyproject.rs | 4 +- crates/uv-workspace/src/pyproject_mut.rs | 2 +- crates/uv-workspace/src/workspace.rs | 6 +- hawk.toml | 2047 +++++++++++++++++ 89 files changed, 2269 insertions(+), 225 deletions(-) create mode 100644 hawk.toml diff --git a/crates/uv-audit/src/types.rs b/crates/uv-audit/src/types.rs index 6fd9ffc48f34f..d2b29b324f15f 100644 --- a/crates/uv-audit/src/types.rs +++ b/crates/uv-audit/src/types.rs @@ -102,7 +102,7 @@ pub struct Vulnerability { } impl Vulnerability { - pub fn new( + pub(crate) fn new( dependency: Dependency, id: VulnerabilityID, summary: Option, diff --git a/crates/uv-auth/src/keyring.rs b/crates/uv-auth/src/keyring.rs index 24adaca0f2970..c785ef18a8ff2 100644 --- a/crates/uv-auth/src/keyring.rs +++ b/crates/uv-auth/src/keyring.rs @@ -59,7 +59,7 @@ impl std::fmt::Display for KeyringProviderBackend { impl KeyringProvider { /// Create a new [`KeyringProvider::Native`]. - pub fn native() -> Self { + pub(crate) fn native() -> Self { Self { backend: KeyringProviderBackend::Native, } diff --git a/crates/uv-auth/src/store.rs b/crates/uv-auth/src/store.rs index 2bf56959cf32d..7ecf6f002016e 100644 --- a/crates/uv-auth/src/store.rs +++ b/crates/uv-auth/src/store.rs @@ -91,7 +91,7 @@ pub enum TomlCredentialError { } impl TomlCredentialError { - pub fn as_io_error(&self) -> Option<&std::io::Error> { + pub(crate) fn as_io_error(&self) -> Option<&std::io::Error> { match self { Self::Io(err) => Some(err), Self::LockedFile(err) => err.as_io_error(), @@ -261,7 +261,7 @@ impl TextCredentialStore { } /// Acquire a lock on the credentials file at the given path. - pub async fn lock(path: &Path) -> Result { + pub(crate) async fn lock(path: &Path) -> Result { if let Some(parent) = path.parent() { fs::create_dir_all(parent)?; } @@ -297,7 +297,9 @@ impl TextCredentialStore { /// Returns [`TextCredentialStore`] and a [`LockedFile`] to hold if mutating the store. /// /// If the store will not be written to following the read, the lock can be dropped. - pub async fn read>(path: P) -> Result<(Self, LockedFile), TomlCredentialError> { + pub(crate) async fn read>( + path: P, + ) -> Result<(Self, LockedFile), TomlCredentialError> { let lock = Self::lock(path.as_ref()).await?; let store = Self::from_file(path)?; Ok((store, lock)) diff --git a/crates/uv-bin-install/src/lib.rs b/crates/uv-bin-install/src/lib.rs index 4287563513ae7..d7bfa10f91198 100644 --- a/crates/uv-bin-install/src/lib.rs +++ b/crates/uv-bin-install/src/lib.rs @@ -59,7 +59,7 @@ impl Binary { /// The name of the binary. /// /// See [`Binary::executable`] for the platform-specific executable name. - pub fn name(&self) -> &'static str { + pub(crate) fn name(self) -> &'static str { match self { Self::Ruff => "ruff", Self::Uv => "uv", @@ -167,7 +167,7 @@ impl Binary { } /// Get the executable name - pub fn executable(&self) -> String { + pub(crate) fn executable(self) -> String { format!("{}{}", self.name(), std::env::consts::EXE_SUFFIX) } } diff --git a/crates/uv-build-backend/src/settings.rs b/crates/uv-build-backend/src/settings.rs index ae77779054b39..c39525f26988e 100644 --- a/crates/uv-build-backend/src/settings.rs +++ b/crates/uv-build-backend/src/settings.rs @@ -216,7 +216,7 @@ pub struct WheelDataIncludes { impl WheelDataIncludes { /// Yield all data directories name and corresponding paths. - pub fn iter(&self) -> impl Iterator { + pub(crate) fn iter(&self) -> impl Iterator { [ ("purelib", self.purelib.as_deref()), ("platlib", self.platlib.as_deref()), diff --git a/crates/uv-build-frontend/src/lib.rs b/crates/uv-build-frontend/src/lib.rs index 5ad3497edd1d6..bd9f487cdd57d 100644 --- a/crates/uv-build-frontend/src/lib.rs +++ b/crates/uv-build-frontend/src/lib.rs @@ -723,7 +723,7 @@ impl SourceBuild { /// Try calling `prepare_metadata_for_build_wheel` to get the metadata without executing the /// actual build. - pub async fn get_metadata_without_build(&mut self) -> Result, Error> { + pub(crate) async fn get_metadata_without_build(&mut self) -> Result, Error> { // We've already called this method; return the existing result. if let Some(metadata_dir) = &self.metadata_directory { return Ok(Some(metadata_dir.clone())); diff --git a/crates/uv-cache/src/archive.rs b/crates/uv-cache/src/archive.rs index 352ae6230c83c..ad2ad73812d4d 100644 --- a/crates/uv-cache/src/archive.rs +++ b/crates/uv-cache/src/archive.rs @@ -18,7 +18,7 @@ impl Default for ArchiveId { impl ArchiveId { /// Generate a new unique identifier for an archive. - pub fn new() -> Self { + pub(crate) fn new() -> Self { Self(uv_fastid::Id::insecure().to_string()) } } diff --git a/crates/uv-cache/src/lib.rs b/crates/uv-cache/src/lib.rs index f40a883e937f2..d672d5f3d82aa 100644 --- a/crates/uv-cache/src/lib.rs +++ b/crates/uv-cache/src/lib.rs @@ -1321,7 +1321,7 @@ impl CacheBucket { } /// Return an iterator over all cache buckets. - pub fn iter() -> impl Iterator { + pub(crate) fn iter() -> impl Iterator { [ Self::Wheels, Self::SourceDistributions, diff --git a/crates/uv-client/src/base_client.rs b/crates/uv-client/src/base_client.rs index ed93afa702cbf..2ee35906d7205 100644 --- a/crates/uv-client/src/base_client.rs +++ b/crates/uv-client/src/base_client.rs @@ -260,13 +260,13 @@ impl<'a> BaseClientBuilder<'a> { } #[must_use] - pub fn markers(mut self, markers: &'a MarkerEnvironment) -> Self { + pub(crate) fn markers(mut self, markers: &'a MarkerEnvironment) -> Self { self.markers = Some(markers); self } #[must_use] - pub fn platform(mut self, platform: &'a Platform) -> Self { + pub(crate) fn platform(mut self, platform: &'a Platform) -> Self { self.platform = Some(platform); self } @@ -278,7 +278,7 @@ impl<'a> BaseClientBuilder<'a> { } #[must_use] - pub fn indexes(mut self, indexes: Indexes) -> Self { + pub(crate) fn indexes(mut self, indexes: Indexes) -> Self { self.indexes = indexes; self } @@ -430,7 +430,7 @@ impl<'a> BaseClientBuilder<'a> { } /// Share the underlying client between two different middleware configurations. - pub fn wrap_existing(&self, existing: &BaseClient) -> BaseClient { + pub(crate) fn wrap_existing(&self, existing: &BaseClient) -> BaseClient { // Wrap in any relevant middleware and handle connectivity. let client = RedirectClientWithMiddleware { client: self.apply_middleware(existing.raw_client.clone()), @@ -714,14 +714,14 @@ impl BaseClient { } /// Returns `true` if the host is trusted to use the insecure client. - pub fn disable_ssl(&self, url: &DisplaySafeUrl) -> bool { + pub(crate) fn disable_ssl(&self, url: &DisplaySafeUrl) -> bool { self.allow_insecure_host .iter() .any(|allow_insecure_host| allow_insecure_host.matches(url)) } /// The configured client read timeout. - pub fn read_timeout(&self) -> Duration { + pub(crate) fn read_timeout(&self) -> Duration { self.read_timeout } @@ -740,7 +740,7 @@ impl BaseClient { retry_policy(self.retries, self.no_retry_delay) } - pub fn credentials_cache(&self) -> &CredentialsCache { + pub(crate) fn credentials_cache(&self) -> &CredentialsCache { &self.credentials_cache } @@ -778,12 +778,12 @@ impl RedirectClientWithMiddleware { } /// Convenience method to make a `HEAD` request to a URL. - pub fn head(&self, url: U) -> RequestBuilder<'_> { + pub(crate) fn head(&self, url: U) -> RequestBuilder<'_> { RequestBuilder::new(self.client.head(url), self) } /// Executes a request, applying the redirect policy. - pub async fn execute(&self, req: Request) -> reqwest_middleware::Result { + pub(crate) async fn execute(&self, req: Request) -> reqwest_middleware::Result { match self.redirect_policy { RedirectPolicy::BypassMiddleware => self.client.execute(req).await, RedirectPolicy::RetriggerMiddleware => self.execute_with_redirect_handling(req).await, @@ -1019,7 +1019,7 @@ pub struct RequestBuilder<'a> { } impl<'a> RequestBuilder<'a> { - pub fn new( + pub(crate) fn new( builder: reqwest_middleware::RequestBuilder, client: &'a RedirectClientWithMiddleware, ) -> Self { diff --git a/crates/uv-client/src/flat_index.rs b/crates/uv-client/src/flat_index.rs index 15003a80e4093..c44c163c0442d 100644 --- a/crates/uv-client/src/flat_index.rs +++ b/crates/uv-client/src/flat_index.rs @@ -47,7 +47,7 @@ pub struct FlatIndexEntry { impl FlatIndexEntry { /// Return the distribution filename. - pub fn filename(&self) -> &DistFilename { + pub(crate) fn filename(&self) -> &DistFilename { &self.filename } diff --git a/crates/uv-client/src/retry.rs b/crates/uv-client/src/retry.rs index 3f4e5777ab376..8f0202a944c3f 100644 --- a/crates/uv-client/src/retry.rs +++ b/crates/uv-client/src/retry.rs @@ -75,7 +75,7 @@ impl RetryState { } /// The total duration from the first request to the (failure) of the last request. - pub fn duration(&self) -> Result { + pub(crate) fn duration(&self) -> Result { self.start_time.elapsed() } diff --git a/crates/uv-client/src/rkyvutil.rs b/crates/uv-client/src/rkyvutil.rs index 91f18741d3114..33d832333935f 100644 --- a/crates/uv-client/src/rkyvutil.rs +++ b/crates/uv-client/src/rkyvutil.rs @@ -77,7 +77,7 @@ where /// /// If the bytes fail validation (e.g., contains unaligned pointers or /// strings aren't valid UTF-8), then this returns an error. - pub fn new(raw: AlignedVec) -> Result { + pub(crate) fn new(raw: AlignedVec) -> Result { // We convert the error to a simple string because... the error type // does not implement Send. And I don't think we really need to keep // the error type around anyway. @@ -139,7 +139,7 @@ where /// Note that because this type has a `Deref` impl, this method requires /// fully-qualified syntax. So, if `o` is an `OwnedValue`, then use /// `OwnedValue::as_bytes(&o)`. - pub fn as_bytes(this: &Self) -> &[u8] { + pub(crate) fn as_bytes(this: &Self) -> &[u8] { &this.raw } diff --git a/crates/uv-configuration/src/dependency_groups.rs b/crates/uv-configuration/src/dependency_groups.rs index 62f51dd7ff9ad..c61ee96c88a63 100644 --- a/crates/uv-configuration/src/dependency_groups.rs +++ b/crates/uv-configuration/src/dependency_groups.rs @@ -355,7 +355,7 @@ pub enum IncludeGroups { impl IncludeGroups { /// Returns `true` if the specification includes the given group. - pub fn contains(&self, group: &GroupName) -> bool { + pub(crate) fn contains(&self, group: &GroupName) -> bool { match self { Self::Some(groups) => groups.contains(group), Self::All => true, diff --git a/crates/uv-configuration/src/extras.rs b/crates/uv-configuration/src/extras.rs index 7c5fd05e4db74..0225a78537489 100644 --- a/crates/uv-configuration/src/extras.rs +++ b/crates/uv-configuration/src/extras.rs @@ -139,7 +139,7 @@ impl ExtrasSpecificationInner { /// and instead just install the extras. /// /// (This is really just asking if an --only flag was passed.) - pub fn prod(&self) -> bool { + pub(crate) fn prod(&self) -> bool { !self.only_extras } @@ -288,7 +288,7 @@ pub enum IncludeExtras { impl IncludeExtras { /// Returns `true` if the specification includes the given extra. - pub fn contains(&self, extra: &ExtraName) -> bool { + pub(crate) fn contains(&self, extra: &ExtraName) -> bool { match self { Self::Some(extras) => extras.contains(extra), Self::All => true, @@ -296,7 +296,7 @@ impl IncludeExtras { } /// Returns `true` if the specification will have no effect. - pub fn is_empty(&self) -> bool { + pub(crate) fn is_empty(&self) -> bool { match self { Self::Some(extras) => extras.is_empty(), // Although technically this is a noop if they have no extras, diff --git a/crates/uv-configuration/src/overrides.rs b/crates/uv-configuration/src/overrides.rs index e67ea86f21162..ded2cca9b2029 100644 --- a/crates/uv-configuration/src/overrides.rs +++ b/crates/uv-configuration/src/overrides.rs @@ -31,7 +31,7 @@ impl Overrides { } /// Get the overrides for a package. - pub fn get(&self, name: &PackageName) -> Option<&Vec> { + pub(crate) fn get(&self, name: &PackageName) -> Option<&Vec> { self.0.get(name) } diff --git a/crates/uv-configuration/src/package_options.rs b/crates/uv-configuration/src/package_options.rs index 2225e3ae7624a..ee57fe2c9458d 100644 --- a/crates/uv-configuration/src/package_options.rs +++ b/crates/uv-configuration/src/package_options.rs @@ -157,7 +157,7 @@ pub struct Upgrade { impl Upgrade { /// Create a new [`Upgrade`] with no upgrades nor constraints. - pub fn none() -> Self { + pub(crate) fn none() -> Self { Self { strategy: UpgradeStrategy::None, constraints: FxHashMap::default(), diff --git a/crates/uv-configuration/src/target_triple.rs b/crates/uv-configuration/src/target_triple.rs index 9adbd27d87b2b..8f704232815c7 100644 --- a/crates/uv-configuration/src/target_triple.rs +++ b/crates/uv-configuration/src/target_triple.rs @@ -684,7 +684,7 @@ impl TargetTriple { } /// Return the `platform_machine` value for the target. - pub fn platform_machine(self) -> &'static str { + pub(crate) fn platform_machine(self) -> &'static str { match self { Self::Windows | Self::X8664PcWindowsMsvc => "x86_64", Self::Aarch64PcWindowsMsvc => "ARM64", @@ -732,7 +732,7 @@ impl TargetTriple { } /// Return the `platform_system` value for the target. - pub fn platform_system(self) -> &'static str { + pub(crate) fn platform_system(self) -> &'static str { match self { Self::Windows | Self::X8664PcWindowsMsvc => "Windows", Self::Aarch64PcWindowsMsvc => "Windows", @@ -780,7 +780,7 @@ impl TargetTriple { } /// Return the `platform_version` value for the target. - pub fn platform_version(self) -> &'static str { + pub(crate) fn platform_version(self) -> &'static str { match self { Self::Windows | Self::X8664PcWindowsMsvc => "", Self::Aarch64PcWindowsMsvc => "", @@ -831,7 +831,7 @@ impl TargetTriple { } /// Return the `platform_release` value for the target. - pub fn platform_release(self) -> &'static str { + pub(crate) fn platform_release(self) -> &'static str { match self { Self::Windows | Self::X8664PcWindowsMsvc => "", Self::Aarch64PcWindowsMsvc => "", @@ -881,7 +881,7 @@ impl TargetTriple { } /// Return the `os_name` value for the target. - pub fn os_name(self) -> &'static str { + pub(crate) fn os_name(self) -> &'static str { match self { Self::Windows | Self::X8664PcWindowsMsvc => "nt", Self::Aarch64PcWindowsMsvc => "nt", @@ -929,7 +929,7 @@ impl TargetTriple { } /// Return the `sys_platform` value for the target. - pub fn sys_platform(self) -> &'static str { + pub(crate) fn sys_platform(self) -> &'static str { match self { Self::Windows | Self::X8664PcWindowsMsvc => "win32", Self::Aarch64PcWindowsMsvc => "win32", diff --git a/crates/uv-distribution-filename/src/extension.rs b/crates/uv-distribution-filename/src/extension.rs index 1849600a54cc7..5fb4f033caf6e 100644 --- a/crates/uv-distribution-filename/src/extension.rs +++ b/crates/uv-distribution-filename/src/extension.rs @@ -102,7 +102,7 @@ impl SourceDistExtension { } /// Return the name for the extension. - pub fn name(&self) -> &'static str { + pub(crate) fn name(self) -> &'static str { match self { Self::Tar => "tar", Self::TarBz2 => "tar.bz2", diff --git a/crates/uv-distribution-types/src/build_info.rs b/crates/uv-distribution-types/src/build_info.rs index fd59299b8699f..b4bad37bc43c5 100644 --- a/crates/uv-distribution-types/src/build_info.rs +++ b/crates/uv-distribution-types/src/build_info.rs @@ -38,7 +38,7 @@ impl BuildInfo { } /// Returns `true` if the [`BuildInfo`] is empty, meaning it has no configuration settings, - pub fn is_empty(&self) -> bool { + pub(crate) fn is_empty(&self) -> bool { self.config_settings.is_empty() && self.extra_build_requires.is_empty() && self.extra_build_variables.is_empty() diff --git a/crates/uv-distribution-types/src/buildable.rs b/crates/uv-distribution-types/src/buildable.rs index 4475782d01f29..1edfc81deadcd 100644 --- a/crates/uv-distribution-types/src/buildable.rs +++ b/crates/uv-distribution-types/src/buildable.rs @@ -118,7 +118,7 @@ impl SourceUrl<'_> { } /// Return the source tree of the source, if available. - pub fn source_tree(&self) -> Option<&Path> { + pub(crate) fn source_tree(&self) -> Option<&Path> { match self { Self::Directory(dist) => Some(dist.install_path), _ => None, @@ -126,7 +126,7 @@ impl SourceUrl<'_> { } /// Returns `true` if the source is editable. - pub fn is_editable(&self) -> bool { + pub(crate) fn is_editable(&self) -> bool { matches!( self, Self::Directory(DirectorySourceUrl { diff --git a/crates/uv-distribution-types/src/file.rs b/crates/uv-distribution-types/src/file.rs index 581d673376a58..c8b9ee15e4b00 100644 --- a/crates/uv-distribution-types/src/file.rs +++ b/crates/uv-distribution-types/src/file.rs @@ -206,7 +206,7 @@ pub struct UrlString(SmallString); impl UrlString { /// Create a new [`UrlString`] from a [`String`]. - pub fn new(url: SmallString) -> Self { + pub(crate) fn new(url: SmallString) -> Self { Self(url) } diff --git a/crates/uv-distribution-types/src/id.rs b/crates/uv-distribution-types/src/id.rs index 91537bcfe3d04..0212e40199a4d 100644 --- a/crates/uv-distribution-types/src/id.rs +++ b/crates/uv-distribution-types/src/id.rs @@ -24,12 +24,12 @@ pub enum PackageId { impl PackageId { /// Create a new [`PackageId`] from a package name and version. - pub fn from_registry(name: PackageName) -> Self { + pub(crate) fn from_registry(name: PackageName) -> Self { Self::Name(name) } /// Create a new [`PackageId`] from a URL. - pub fn from_url(url: &DisplaySafeUrl) -> Self { + pub(crate) fn from_url(url: &DisplaySafeUrl) -> Self { Self::Url(CanonicalUrl::new(url)) } } diff --git a/crates/uv-distribution-types/src/index.rs b/crates/uv-distribution-types/src/index.rs index ec498f049e8e0..d3e1e86308801 100644 --- a/crates/uv-distribution-types/src/index.rs +++ b/crates/uv-distribution-types/src/index.rs @@ -488,7 +488,7 @@ impl Index { } /// Return the [`IndexStatusCodeStrategy`] for this index. - pub fn status_code_strategy(&self) -> IndexStatusCodeStrategy { + pub(crate) fn status_code_strategy(&self) -> IndexStatusCodeStrategy { if let Some(ignore_error_codes) = &self.ignore_error_codes { IndexStatusCodeStrategy::from_ignored_error_codes(ignore_error_codes) } else { @@ -513,7 +513,7 @@ impl Index { } /// Return the `exclude-newer` setting for this index. - pub fn exclude_newer(&self) -> Option<&ExcludeNewerOverride> { + pub(crate) fn exclude_newer(&self) -> Option<&ExcludeNewerOverride> { self.exclude_newer.as_ref() } } diff --git a/crates/uv-distribution-types/src/index_name.rs b/crates/uv-distribution-types/src/index_name.rs index 68ee56822499a..9e508df7ecc64 100644 --- a/crates/uv-distribution-types/src/index_name.rs +++ b/crates/uv-distribution-types/src/index_name.rs @@ -16,7 +16,7 @@ pub struct IndexName(SmallString); impl IndexName { /// Validates the given index name and returns [`IndexName`] if it's valid, or an error /// otherwise. - pub fn new(name: &str) -> Result { + pub(crate) fn new(name: &str) -> Result { for c in name.chars() { match c { 'a'..='z' | 'A'..='Z' | '0'..='9' | '-' | '_' | '.' => {} diff --git a/crates/uv-distribution-types/src/installed.rs b/crates/uv-distribution-types/src/installed.rs index ff49cd7cfb9c5..781514fc1f510 100644 --- a/crates/uv-distribution-types/src/installed.rs +++ b/crates/uv-distribution-types/src/installed.rs @@ -534,7 +534,7 @@ impl InstalledDist { } /// Return true if the distribution refers to a local file or directory. - pub fn is_local(&self) -> bool { + pub(crate) fn is_local(&self) -> bool { match &self.kind { InstalledDistKind::Registry(_) => false, InstalledDistKind::Url(dist) => { diff --git a/crates/uv-distribution-types/src/known_platform.rs b/crates/uv-distribution-types/src/known_platform.rs index 308244be66e03..75e27a25b7ecd 100644 --- a/crates/uv-distribution-types/src/known_platform.rs +++ b/crates/uv-distribution-types/src/known_platform.rs @@ -21,7 +21,7 @@ impl KnownPlatform { } /// Return a [`MarkerTree`] for the platform. - pub fn marker(self) -> MarkerTree { + pub(crate) fn marker(self) -> MarkerTree { MarkerTree::expression(MarkerExpression::String { key: MarkerValueString::SysPlatform, operator: MarkerOperator::Equal, diff --git a/crates/uv-distribution-types/src/lib.rs b/crates/uv-distribution-types/src/lib.rs index d37d0be547271..8a1ee551a72e6 100644 --- a/crates/uv-distribution-types/src/lib.rs +++ b/crates/uv-distribution-types/src/lib.rs @@ -617,7 +617,7 @@ impl Dist { } /// Return true if the distribution is editable. - pub fn is_editable(&self) -> bool { + pub(crate) fn is_editable(&self) -> bool { match self { Self::Source(dist) => dist.is_editable(), Self::Built(_) => false, @@ -625,7 +625,7 @@ impl Dist { } /// Return true if the distribution refers to a local file or directory. - pub fn is_local(&self) -> bool { + pub(crate) fn is_local(&self) -> bool { match self { Self::Source(dist) => dist.is_local(), Self::Built(dist) => dist.is_local(), @@ -696,7 +696,7 @@ impl<'a> From<&'a BuiltDist> for DistRef<'a> { impl BuiltDist { /// Return true if the distribution refers to a local file or directory. - pub fn is_local(&self) -> bool { + pub(crate) fn is_local(&self) -> bool { matches!(self, Self::Path(_)) } @@ -711,7 +711,7 @@ impl BuiltDist { } /// Returns the [`File`] instance, if this distribution is from a registry. - pub fn file(&self) -> Option<&File> { + pub(crate) fn file(&self) -> Option<&File> { match self { Self::Registry(registry) => Some(®istry.best_wheel().file), Self::DirectUrl(_) | Self::Path(_) | Self::GitPath(_) => None, @@ -741,7 +741,7 @@ impl SourceDist { } /// Returns the [`IndexUrl`], if the distribution is from a registry. - pub fn index(&self) -> Option<&IndexUrl> { + pub(crate) fn index(&self) -> Option<&IndexUrl> { match self { Self::Registry(registry) => Some(®istry.index), Self::DirectUrl(_) @@ -753,7 +753,7 @@ impl SourceDist { } /// Returns the [`File`] instance, if this dist is from a registry with simple json api support - pub fn file(&self) -> Option<&File> { + pub(crate) fn file(&self) -> Option<&File> { match self { Self::Registry(registry) => Some(®istry.file), Self::DirectUrl(_) @@ -793,7 +793,7 @@ impl SourceDist { } /// Returns `true` if the distribution refers to a local file or directory. - pub fn is_local(&self) -> bool { + pub(crate) fn is_local(&self) -> bool { matches!(self, Self::Directory(_) | Self::Path(_)) } @@ -807,7 +807,7 @@ impl SourceDist { } /// Returns the source tree of the distribution, if available. - pub fn source_tree(&self) -> Option<&Path> { + pub(crate) fn source_tree(&self) -> Option<&Path> { match self { Self::Directory(dist) => Some(&dist.install_path), _ => None, diff --git a/crates/uv-distribution-types/src/prioritized_distribution.rs b/crates/uv-distribution-types/src/prioritized_distribution.rs index a8ff5be1c9356..212e0355fc8e0 100644 --- a/crates/uv-distribution-types/src/prioritized_distribution.rs +++ b/crates/uv-distribution-types/src/prioritized_distribution.rs @@ -668,7 +668,7 @@ impl<'a> CompatibleDist<'a> { impl WheelCompatibility { /// Return `true` if the distribution is compatible. - pub fn is_compatible(&self) -> bool { + pub(crate) fn is_compatible(&self) -> bool { matches!(self, Self::Compatible(_, _, _)) } @@ -700,7 +700,7 @@ impl WheelCompatibility { impl SourceDistCompatibility { /// Return `true` if the distribution is compatible. - pub fn is_compatible(&self) -> bool { + pub(crate) fn is_compatible(&self) -> bool { matches!(self, Self::Compatible(_)) } diff --git a/crates/uv-distribution-types/src/requirement.rs b/crates/uv-distribution-types/src/requirement.rs index c2d0b1c27f113..ff9d486429271 100644 --- a/crates/uv-distribution-types/src/requirement.rs +++ b/crates/uv-distribution-types/src/requirement.rs @@ -90,7 +90,7 @@ impl Requirement { #[must_use] pub fn to_absolute(self, path: &Path) -> Self { Self { - source: self.source.to_absolute(path), + source: self.source.into_absolute(path), ..self } } @@ -608,7 +608,7 @@ pub enum RequirementSource { impl RequirementSource { /// Construct a [`RequirementSource`] for a URL source, given a URL parsed into components and /// the PEP 508 string (after the `@`) as [`VerbatimUrl`]. - pub fn from_parsed_url(parsed_url: ParsedUrl, url: VerbatimUrl) -> Self { + pub(crate) fn from_parsed_url(parsed_url: ParsedUrl, url: VerbatimUrl) -> Self { match parsed_url { ParsedUrl::Path(local_file) => Self::Path { install_path: local_file.install_path.clone(), @@ -767,7 +767,7 @@ impl RequirementSource { } /// Convert the source to a [`RequirementSource`] relative to the given path. - pub fn relative_to(self, path: &Path) -> Result { + pub(crate) fn relative_to(self, path: &Path) -> Result { match self { Self::Registry { .. } | Self::Url { .. } @@ -801,7 +801,7 @@ impl RequirementSource { /// Convert the source to a [`RequirementSource`] with an absolute path based on the given root. #[must_use] - pub fn to_absolute(self, root: &Path) -> Self { + pub(crate) fn into_absolute(self, root: &Path) -> Self { match self { Self::Registry { .. } | Self::Url { .. } diff --git a/crates/uv-distribution-types/src/requires_python.rs b/crates/uv-distribution-types/src/requires_python.rs index 288af4085e935..ae8c1d286680e 100644 --- a/crates/uv-distribution-types/src/requires_python.rs +++ b/crates/uv-distribution-types/src/requires_python.rs @@ -530,7 +530,7 @@ pub struct RequiresPythonRange(LowerBound, UpperBound); impl RequiresPythonRange { /// Initialize a [`RequiresPythonRange`] from a [`Range`]. - pub fn from_range(range: &Ranges) -> Self { + pub(crate) fn from_range(range: &Ranges) -> Self { let (lower, upper) = range .bounding_range() .map(|(lower_bound, upper_bound)| (lower_bound.cloned(), upper_bound.cloned())) @@ -554,7 +554,7 @@ impl RequiresPythonRange { } /// Returns the [`VersionSpecifiers`] for the range. - pub fn specifiers(&self) -> VersionSpecifiers { + pub(crate) fn specifiers(&self) -> VersionSpecifiers { [self.0.specifier(), self.1.specifier()] .into_iter() .flatten() diff --git a/crates/uv-distribution-types/src/status_code_strategy.rs b/crates/uv-distribution-types/src/status_code_strategy.rs index 515d44d615150..602933102681a 100644 --- a/crates/uv-distribution-types/src/status_code_strategy.rs +++ b/crates/uv-distribution-types/src/status_code_strategy.rs @@ -21,7 +21,7 @@ pub enum IndexStatusCodeStrategy { impl IndexStatusCodeStrategy { /// Derive a strategy from an index URL. We special-case PyTorch. Otherwise, /// we follow the default strategy. - pub fn from_index_url(url: &Url) -> Self { + pub(crate) fn from_index_url(url: &Url) -> Self { if url .host_str() .is_some_and(|host| host.eq_ignore_ascii_case("download.pytorch.org")) diff --git a/crates/uv-distribution/src/download.rs b/crates/uv-distribution/src/download.rs index 0aab6ef9dda7f..465844a9be9a7 100644 --- a/crates/uv-distribution/src/download.rs +++ b/crates/uv-distribution/src/download.rs @@ -33,7 +33,7 @@ impl LocalWheel { } /// Return the [`Dist`] from which this wheel was downloaded. - pub fn remote(&self) -> &Dist { + pub(crate) fn remote(&self) -> &Dist { &self.dist } @@ -43,7 +43,7 @@ impl LocalWheel { } /// Read the [`ResolutionMetadata`] from a wheel. - pub fn metadata(&self) -> Result { + pub(crate) fn metadata(&self) -> Result { read_flat_wheel_metadata(&self.filename, &self.archive) .map_err(|err| Error::WheelMetadata(self.archive.to_path_buf(), Box::new(err))) } diff --git a/crates/uv-distribution/src/metadata/build_requires.rs b/crates/uv-distribution/src/metadata/build_requires.rs index eb2fb4e906faf..7abbd2a161a5e 100644 --- a/crates/uv-distribution/src/metadata/build_requires.rs +++ b/crates/uv-distribution/src/metadata/build_requires.rs @@ -24,7 +24,7 @@ pub struct BuildRequires { impl BuildRequires { /// Lower without considering `tool.uv` in `pyproject.toml`, used for index and other archive /// dependencies. - pub fn from_metadata23(metadata: uv_pypi_types::BuildRequires) -> Self { + pub(crate) fn from_metadata23(metadata: uv_pypi_types::BuildRequires) -> Self { Self { name: metadata.name, requires_dist: metadata diff --git a/crates/uv-distribution/src/metadata/mod.rs b/crates/uv-distribution/src/metadata/mod.rs index 4a0c2016ed484..54a9faaeb8ae4 100644 --- a/crates/uv-distribution/src/metadata/mod.rs +++ b/crates/uv-distribution/src/metadata/mod.rs @@ -78,7 +78,7 @@ pub struct Metadata { impl Metadata { /// Lower without considering `tool.uv` in `pyproject.toml`, used for index and other archive /// dependencies. - pub fn from_metadata23(metadata: ResolutionMetadata) -> Self { + pub(crate) fn from_metadata23(metadata: ResolutionMetadata) -> Self { Self { name: metadata.name, version: metadata.version, @@ -94,7 +94,7 @@ impl Metadata { /// Lower by considering `tool.uv` in `pyproject.toml` if present, used for Git and directory /// dependencies. - pub async fn from_workspace( + pub(crate) async fn from_workspace( metadata: ResolutionMetadata, install_path: &Path, git_source: Option<&GitWorkspaceMember<'_>>, diff --git a/crates/uv-distribution/src/metadata/requires_dist.rs b/crates/uv-distribution/src/metadata/requires_dist.rs index 24f0689376439..a0d85cf08cba0 100644 --- a/crates/uv-distribution/src/metadata/requires_dist.rs +++ b/crates/uv-distribution/src/metadata/requires_dist.rs @@ -42,7 +42,7 @@ impl RequiresDist { /// Lower by considering `tool.uv` in `pyproject.toml` if present, used for Git and directory /// dependencies. - pub async fn from_project_maybe_workspace( + pub(crate) async fn from_project_maybe_workspace( metadata: uv_pypi_types::RequiresDist, install_path: &Path, git_member: Option<&GitWorkspaceMember<'_>>, diff --git a/crates/uv-git/src/source.rs b/crates/uv-git/src/source.rs index 2c35edee9793d..62bedb6e14392 100644 --- a/crates/uv-git/src/source.rs +++ b/crates/uv-git/src/source.rs @@ -32,7 +32,7 @@ pub struct GitSource { impl GitSource { /// Initialize a [`GitSource`] with the given Git URL, HTTP client, and cache path. - pub fn new(git: GitUrl, cache: impl Into, offline: bool) -> Self { + pub(crate) fn new(git: GitUrl, cache: impl Into, offline: bool) -> Self { Self { git, disable_ssl: false, @@ -53,7 +53,7 @@ impl GitSource { /// Set the [`Reporter`] to use for the [`GitSource`]. #[must_use] - pub fn with_reporter(self, reporter: Arc) -> Self { + pub(crate) fn with_reporter(self, reporter: Arc) -> Self { Self { reporter: Some(reporter), ..self @@ -62,7 +62,7 @@ impl GitSource { /// Fetch the underlying Git repository at the given revision. #[instrument(skip(self), fields(repository = %self.git.url(), rev = ?self.git.precise()))] - pub fn fetch(self) -> Result { + pub(crate) fn fetch(self) -> Result { let lfs_requested = self.git.lfs().enabled(); // The path to the repo, within the Git database. diff --git a/crates/uv-install-wheel/src/linker.rs b/crates/uv-install-wheel/src/linker.rs index ee34469109eaa..08ef3149b564f 100644 --- a/crates/uv-install-wheel/src/linker.rs +++ b/crates/uv-install-wheel/src/linker.rs @@ -42,7 +42,7 @@ impl InstallState { } /// Get the underlying copy locks for use with [`uv_fs::link::link_dir`] functions. - pub fn copy_locks(&self) -> &CopyLocks { + pub(crate) fn copy_locks(&self) -> &CopyLocks { &self.locks } diff --git a/crates/uv-installer/src/preparer.rs b/crates/uv-installer/src/preparer.rs index ed666af496a26..e2062aa3da5c3 100644 --- a/crates/uv-installer/src/preparer.rs +++ b/crates/uv-installer/src/preparer.rs @@ -108,7 +108,7 @@ impl<'a, Context: BuildContext> Preparer<'a, Context> { } /// Download, build, and unzip a single wheel. #[instrument(skip_all, fields(name = % dist, size = ? dist.size(), url = dist.file().map(| file | file.url.to_string()).unwrap_or_default()))] - pub async fn get_wheel( + pub(crate) async fn get_wheel( &self, dist: Dist, in_flight: &InFlight, diff --git a/crates/uv-installer/src/site_packages.rs b/crates/uv-installer/src/site_packages.rs index 30406f3ad90f0..9907995940a01 100644 --- a/crates/uv-installer/src/site_packages.rs +++ b/crates/uv-installer/src/site_packages.rs @@ -187,7 +187,7 @@ impl SitePackages { } /// Returns `true` if there are any installed packages. - pub fn any(&self) -> bool { + pub(crate) fn any(&self) -> bool { self.distributions.iter().any(Option::is_some) } diff --git a/crates/uv-keyring/src/error.rs b/crates/uv-keyring/src/error.rs index 3f6587d9535d0..31ddb8d17c7e3 100644 --- a/crates/uv-keyring/src/error.rs +++ b/crates/uv-keyring/src/error.rs @@ -70,7 +70,7 @@ pub enum Error { pub type Result = std::result::Result; /// Try to interpret a byte vector as a password string -pub fn decode_password(bytes: Vec) -> Result { +pub(crate) fn decode_password(bytes: Vec) -> Result { String::from_utf8(bytes).map_err(|err| Error::BadEncoding(err.into_bytes())) } diff --git a/crates/uv-keyring/src/lib.rs b/crates/uv-keyring/src/lib.rs index d95867a2d24ac..1248fafe971ae 100644 --- a/crates/uv-keyring/src/lib.rs +++ b/crates/uv-keyring/src/lib.rs @@ -217,7 +217,7 @@ pub fn set_default_credential_builder(new: Box) { guard.inner = Some(new); } -pub fn default_credential_builder() -> Box { +pub(crate) fn default_credential_builder() -> Box { #[cfg(any( all(target_os = "linux", feature = "secret-service"), all(target_os = "freebsd", feature = "secret-service"), diff --git a/crates/uv-keyring/src/macos.rs b/crates/uv-keyring/src/macos.rs index 3595f82fef090..6a7216e46b1c6 100644 --- a/crates/uv-keyring/src/macos.rs +++ b/crates/uv-keyring/src/macos.rs @@ -190,7 +190,7 @@ impl MacCredential { /// This will fail if the service or user strings are empty, /// because empty attribute values act as wildcards in the /// Keychain Services API. - pub fn new_with_target( + pub(crate) fn new_with_target( target: Option, service: &str, user: &str, @@ -227,7 +227,7 @@ pub struct MacCredentialBuilder; /// /// On Mac, with default features enabled, /// this is called once when an entry is first created. -pub fn default_credential_builder() -> Box { +pub(crate) fn default_credential_builder() -> Box { Box::new(MacCredentialBuilder {}) } @@ -320,7 +320,7 @@ fn get_keychain(domain: MacKeychainDomain) -> Result { /// /// The macOS error code values used here are from /// [this reference](https://opensource.apple.com/source/libsecurity_keychain/libsecurity_keychain-78/lib/SecBase.h.auto.html) -pub fn decode_error(err: Error) -> ErrorCode { +pub(crate) fn decode_error(err: Error) -> ErrorCode { match err.code() { -25291 => ErrorCode::NoStorageAccess(Box::new(err)), // errSecNotAvailable -25292 => ErrorCode::NoStorageAccess(Box::new(err)), // errSecReadOnly diff --git a/crates/uv-netrc/src/lib.rs b/crates/uv-netrc/src/lib.rs index f84d040d93375..720b7e8d10b6f 100644 --- a/crates/uv-netrc/src/lib.rs +++ b/crates/uv-netrc/src/lib.rs @@ -88,7 +88,7 @@ impl Netrc { /// /// Look up the `NETRC` environment variable if it is defined else use the .netrc (or _netrc /// file on windows) in the user's home directory. - pub fn get_file() -> Option { + pub(crate) fn get_file() -> Option { let env_var = std::env::var("NETRC") .map(PathBuf::from) .map(|f| shellexpand::path::tilde(&f).into_owned()); diff --git a/crates/uv-pep440/src/version.rs b/crates/uv-pep440/src/version.rs index d2007de0304b8..8dbf039739385 100644 --- a/crates/uv-pep440/src/version.rs +++ b/crates/uv-pep440/src/version.rs @@ -436,7 +436,7 @@ impl Version { /// The version `1.0min0` is smaller than all other `1.0` versions, /// like `1.0a1`, `1.0dev0`, etc. #[inline] - pub fn min(&self) -> Option { + pub(crate) fn min(&self) -> Option { match self.inner { VersionInner::Small { ref small } => small.min(), VersionInner::Full { ref full } => full.min, @@ -449,7 +449,7 @@ impl Version { /// The version `1.0max0` is larger than all other `1.0` versions, /// like `1.0.post1`, `1.0+local`, etc. #[inline] - pub fn max(&self) -> Option { + pub(crate) fn max(&self) -> Option { match self.inner { VersionInner::Small { ref small } => small.max(), VersionInner::Full { ref full } => full.max, @@ -618,7 +618,7 @@ impl Version { /// Return the version with any segments apart from the minor version of the release removed. #[inline] #[must_use] - pub fn only_minor_release(&self) -> Self { + pub(crate) fn only_minor_release(&self) -> Self { Self::new(self.release().iter().take(2).copied()) } @@ -1618,7 +1618,7 @@ impl VersionPattern { /// Consumes this pattern and returns ownership of the underlying version. #[inline] - pub fn into_version(self) -> Version { + pub(crate) fn into_version(self) -> Version { self.version } @@ -1746,12 +1746,12 @@ pub enum LocalVersionSlice<'a> { impl LocalVersion { /// Return an empty local version. - pub fn empty() -> Self { + pub(crate) fn empty() -> Self { Self::Segments(Vec::new()) } /// Returns `true` if the local version is empty. - pub fn is_empty(&self) -> bool { + pub(crate) fn is_empty(&self) -> bool { match self { Self::Segments(segments) => segments.is_empty(), Self::Max => false, @@ -1759,7 +1759,7 @@ impl LocalVersion { } /// Convert the local version segments into a slice. - pub fn as_slice(&self) -> LocalVersionSlice<'_> { + pub(crate) fn as_slice(&self) -> LocalVersionSlice<'_> { match self { Self::Segments(segments) => LocalVersionSlice::Segments(segments), Self::Max => LocalVersionSlice::Max, @@ -1832,7 +1832,7 @@ impl Ord for LocalVersionSlice<'_> { impl LocalVersionSlice<'_> { /// Return an empty local version. - pub const fn empty() -> Self { + pub(crate) const fn empty() -> Self { Self::Segments(&[]) } diff --git a/crates/uv-pep440/src/version_specifier.rs b/crates/uv-pep440/src/version_specifier.rs index 026b6505f0c03..0c4a093fe2c3b 100644 --- a/crates/uv-pep440/src/version_specifier.rs +++ b/crates/uv-pep440/src/version_specifier.rs @@ -589,7 +589,7 @@ impl VersionSpecifier { } /// Returns a version specifier representing the given lower bound. - pub fn from_lower_bound(bound: &Bound) -> Option { + pub(crate) fn from_lower_bound(bound: &Bound) -> Option { match bound { Bound::Included(version) => { Some(Self::from_version(Operator::GreaterThanEqual, version.clone()).unwrap()) @@ -602,7 +602,7 @@ impl VersionSpecifier { } /// Returns a version specifier representing the given upper bound. - pub fn from_upper_bound(bound: &Bound) -> Option { + pub(crate) fn from_upper_bound(bound: &Bound) -> Option { match bound { Bound::Included(version) => { Some(Self::from_version(Operator::LessThanEqual, version.clone()).unwrap()) @@ -621,7 +621,7 @@ impl VersionSpecifier { /// See: /// - /// - - pub fn contains(&self, version: &Version) -> bool { + pub(crate) fn contains(&self, version: &Version) -> bool { // "Except where specifically noted below, local version identifiers MUST NOT be permitted // in version specifiers, and local version labels MUST be ignored entirely when checking // if candidate versions match a given version specifier." @@ -983,7 +983,7 @@ impl<'a> TildeVersionSpecifier<'a> { /// /// If a [`Operator::TildeEqual`] is not used, or the version includes more than minor and patch /// segments, this will return [`None`]. - pub fn from_specifier(specifier: VersionSpecifier) -> Option { + pub(crate) fn from_specifier(specifier: VersionSpecifier) -> Option { TildeVersionSpecifier::new(Cow::Owned(specifier)) } diff --git a/crates/uv-pep508/src/marker/environment.rs b/crates/uv-pep508/src/marker/environment.rs index 1638e3004fb5c..4b4947d84bc63 100644 --- a/crates/uv-pep508/src/marker/environment.rs +++ b/crates/uv-pep508/src/marker/environment.rs @@ -144,7 +144,7 @@ impl MarkerEnvironment { /// `Darwin Kernel Version 14.5.0: Wed Jul 29 02:18:53 PDT 2015; /// root:xnu-2782.40.9~2/RELEASE_X86_64`. #[inline] - pub fn platform_version(&self) -> &str { + pub(crate) fn platform_version(&self) -> &str { &self.inner.platform_version } diff --git a/crates/uv-pep508/src/marker/lowering.rs b/crates/uv-pep508/src/marker/lowering.rs index 34e301772261a..2445a82ee36d5 100644 --- a/crates/uv-pep508/src/marker/lowering.rs +++ b/crates/uv-pep508/src/marker/lowering.rs @@ -137,7 +137,7 @@ pub enum CanonicalMarkerValueExtra { impl CanonicalMarkerValueExtra { /// Returns the [`ExtraName`] value. - pub fn extra(&self) -> &ExtraName { + pub(crate) fn extra(&self) -> &ExtraName { match self { Self::Extra(extra) => extra, } diff --git a/crates/uv-pep508/src/marker/tree.rs b/crates/uv-pep508/src/marker/tree.rs index bde5edb123ed4..7ea11087262ca 100644 --- a/crates/uv-pep508/src/marker/tree.rs +++ b/crates/uv-pep508/src/marker/tree.rs @@ -1556,7 +1556,7 @@ impl InMarkerTree<'_> { } /// The value (RHS) for this expression. - pub fn value(&self) -> &ArcStr { + pub(crate) fn value(&self) -> &ArcStr { self.value } @@ -1566,7 +1566,7 @@ impl InMarkerTree<'_> { } /// Returns the subtree associated with the given edge value. - pub fn edge(&self, value: bool) -> MarkerTree { + pub(crate) fn edge(&self, value: bool) -> MarkerTree { if value { MarkerTree(self.high) } else { @@ -1606,7 +1606,7 @@ impl ContainsMarkerTree<'_> { } /// The value (RHS) for this expression. - pub fn value(&self) -> &str { + pub(crate) fn value(&self) -> &str { self.value } @@ -1616,7 +1616,7 @@ impl ContainsMarkerTree<'_> { } /// Returns the subtree associated with the given edge value. - pub fn edge(&self, value: bool) -> MarkerTree { + pub(crate) fn edge(&self, value: bool) -> MarkerTree { if value { MarkerTree(self.high) } else { @@ -1703,7 +1703,7 @@ pub struct ExtraMarkerTree<'a> { impl ExtraMarkerTree<'_> { /// Returns the name of the extra in this expression. - pub fn name(&self) -> &CanonicalMarkerValueExtra { + pub(crate) fn name(&self) -> &CanonicalMarkerValueExtra { self.name } @@ -1713,7 +1713,7 @@ impl ExtraMarkerTree<'_> { } /// Returns the subtree associated with the given edge value. - pub fn edge(&self, value: bool) -> MarkerTree { + pub(crate) fn edge(&self, value: bool) -> MarkerTree { if value { MarkerTree(self.high) } else { diff --git a/crates/uv-pep508/src/verbatim_url.rs b/crates/uv-pep508/src/verbatim_url.rs index aef931589fc8c..cfea470d1d6b3 100644 --- a/crates/uv-pep508/src/verbatim_url.rs +++ b/crates/uv-pep508/src/verbatim_url.rs @@ -688,7 +688,7 @@ impl Scheme { } /// Returns `true` if the scheme is a file scheme. - pub fn is_file(self) -> bool { + pub(crate) fn is_file(&self) -> bool { matches!(self, Self::File) } } diff --git a/crates/uv-platform-tags/src/platform.rs b/crates/uv-platform-tags/src/platform.rs index dfeca0e27304f..13e69183a601b 100644 --- a/crates/uv-platform-tags/src/platform.rs +++ b/crates/uv-platform-tags/src/platform.rs @@ -253,7 +253,7 @@ impl Arch { /// This is the same as the native platform's `uname -m` output. /// /// Based on: - pub fn machine(&self) -> &'static str { + pub(crate) fn machine(self) -> &'static str { match self { Self::Aarch64 => "arm64", Self::Armv5TEL | Self::Armv6L | Self::Armv7L => "arm", diff --git a/crates/uv-platform/src/libc.rs b/crates/uv-platform/src/libc.rs index 3ddc1ea74072a..b358cda4ce5dd 100644 --- a/crates/uv-platform/src/libc.rs +++ b/crates/uv-platform/src/libc.rs @@ -62,7 +62,7 @@ pub enum Libc { } impl Libc { - pub fn from_env() -> Result { + pub(crate) fn from_env() -> Result { match env::consts::OS { "linux" => { if let Ok(libc) = env::var(EnvVars::UV_LIBC) { diff --git a/crates/uv-platform/src/os.rs b/crates/uv-platform/src/os.rs index cb993d0c19a6d..0fc2b93bafc01 100644 --- a/crates/uv-platform/src/os.rs +++ b/crates/uv-platform/src/os.rs @@ -24,7 +24,7 @@ impl Os { matches!(self.0, target_lexicon::OperatingSystem::Emscripten) } - pub fn is_macos(&self) -> bool { + pub(crate) fn is_macos(self) -> bool { matches!(self.0, target_lexicon::OperatingSystem::Darwin(_)) } diff --git a/crates/uv-preview/src/lib.rs b/crates/uv-preview/src/lib.rs index 83b8c60aa68dd..7e56b6c31887d 100644 --- a/crates/uv-preview/src/lib.rs +++ b/crates/uv-preview/src/lib.rs @@ -94,7 +94,7 @@ pub fn finalize() -> Result<(), PreviewError> { /// /// When called before [`init`] or (with the `testing` feature) when the /// current thread does not hold a [`test::with_features`] guard. -pub fn get() -> Preview { +pub(crate) fn get() -> Preview { match PREVIEW.get() { Some(PreviewMode::Normal(mutex)) => match *mutex.lock().unwrap() { PreviewState::Provisional(preview) => preview, diff --git a/crates/uv-pypi-types/src/conflicts.rs b/crates/uv-pypi-types/src/conflicts.rs index 88015d9622eee..26242ad47df9f 100644 --- a/crates/uv-pypi-types/src/conflicts.rs +++ b/crates/uv-pypi-types/src/conflicts.rs @@ -444,7 +444,7 @@ pub enum ConflictKind { impl ConflictKind { /// If this conflict corresponds to an extra, then return the /// extra name. - pub fn extra(&self) -> Option<&ExtraName> { + pub(crate) fn extra(&self) -> Option<&ExtraName> { match self { Self::Extra(extra) => Some(extra), Self::Group(_) | Self::Project => None, @@ -453,7 +453,7 @@ impl ConflictKind { /// If this conflict corresponds to a group, then return the /// group name. - pub fn group(&self) -> Option<&GroupName> { + pub(crate) fn group(&self) -> Option<&GroupName> { match self { Self::Group(group) => Some(group), Self::Extra(_) | Self::Project => None, @@ -500,7 +500,7 @@ impl<'a> ConflictKindRef<'a> { } /// Converts this borrowed conflict to its owned variant. - pub fn to_owned(&self) -> ConflictKind { + pub(crate) fn to_owned(self) -> ConflictKind { match self { Self::Extra(extra) => ConflictKind::Extra((*extra).clone()), Self::Group(group) => ConflictKind::Group((*group).clone()), diff --git a/crates/uv-pypi-types/src/identifier.rs b/crates/uv-pypi-types/src/identifier.rs index c3adfa8f6f071..df1e0136e3b1a 100644 --- a/crates/uv-pypi-types/src/identifier.rs +++ b/crates/uv-pypi-types/src/identifier.rs @@ -33,7 +33,7 @@ pub enum IdentifierParseError { } impl Identifier { - pub fn new(identifier: impl Into>) -> Result { + pub(crate) fn new(identifier: impl Into>) -> Result { let identifier = identifier.into(); let mut chars = identifier.chars().enumerate(); let (_, first_char) = chars.next().ok_or(IdentifierParseError::Empty)?; diff --git a/crates/uv-python/src/discovery.rs b/crates/uv-python/src/discovery.rs index 0384a93b96a1b..c473edebf7823 100644 --- a/crates/uv-python/src/discovery.rs +++ b/crates/uv-python/src/discovery.rs @@ -1766,7 +1766,7 @@ impl PythonVariant { } } - pub fn is_freethreaded(self) -> bool { + pub(crate) fn is_freethreaded(self) -> bool { match self { Self::Default | Self::Debug | Self::Gil | Self::GilDebug => false, Self::Freethreaded | Self::FreethreadedDebug => true, @@ -3227,7 +3227,7 @@ impl VersionRequest { /// Convert this request into a concrete PEP 440 `Version` when possible. /// /// Returns `None` for non-concrete requests - pub fn as_pep440_version(&self) -> Option { + pub(crate) fn as_pep440_version(&self) -> Option { match self { Self::Default | Self::Any | Self::Range(_, _) => None, Self::Major(major, _) => Some(Version::new([u64::from(*major)])), diff --git a/crates/uv-python/src/downloads.rs b/crates/uv-python/src/downloads.rs index 122137bbce65e..23a1b09d170f5 100644 --- a/crates/uv-python/src/downloads.rs +++ b/crates/uv-python/src/downloads.rs @@ -235,7 +235,7 @@ pub struct PlatformRequest { impl PlatformRequest { /// Check if this platform request is satisfied by a platform. - pub fn matches(&self, platform: &Platform) -> bool { + pub(crate) fn matches(&self, platform: &Platform) -> bool { if let Some(os) = self.os { if !platform.os.supports(os) { return false; @@ -302,7 +302,7 @@ impl ArchRequest { } impl PythonDownloadRequest { - pub fn new( + pub(crate) fn new( version: Option, implementation: Option, arch: Option, @@ -443,11 +443,11 @@ impl PythonDownloadRequest { Ok(self) } - pub fn implementation(&self) -> Option<&ImplementationName> { + pub(crate) fn implementation(&self) -> Option<&ImplementationName> { self.implementation.as_ref() } - pub fn version(&self) -> Option<&VersionRequest> { + pub(crate) fn version(&self) -> Option<&VersionRequest> { self.version.as_ref() } @@ -528,7 +528,7 @@ impl PythonDownloadRequest { /// /// The resulting string only includes explicitly-set pieces of the request and returns /// [`None`] when no segments are explicitly set. - pub fn simplified_display(self) -> Option { + pub(crate) fn simplified_display(self) -> Option { let parts = [ self.implementation .map(|implementation| implementation.to_string()), @@ -616,7 +616,7 @@ impl PythonDownloadRequest { } /// Whether this download request opts-in to pre-release Python versions. - pub fn allows_prereleases(&self) -> bool { + pub(crate) fn allows_prereleases(&self) -> bool { self.prereleases.unwrap_or_else(|| { self.version .as_ref() @@ -668,7 +668,7 @@ impl PythonDownloadRequest { } /// Extract the platform components of this request. - pub fn platform(&self) -> PlatformRequest { + pub(crate) fn platform(&self) -> PlatformRequest { PlatformRequest { os: self.os, arch: self.arch, @@ -1110,7 +1110,7 @@ async fn fetch_bytes_from_url(client: &BaseClient, url: &DisplaySafeUrl) -> Resu } impl ManagedPythonDownload { - pub fn url(&self) -> &Cow<'static, str> { + pub(crate) fn url(&self) -> &Cow<'static, str> { &self.url } @@ -1118,11 +1118,11 @@ impl ManagedPythonDownload { &self.key } - pub fn os(&self) -> &Os { + pub(crate) fn os(&self) -> &Os { self.key.os() } - pub fn sha256(&self) -> Option<&Cow<'static, str>> { + pub(crate) fn sha256(&self) -> Option<&Cow<'static, str>> { self.sha256.as_ref() } diff --git a/crates/uv-python/src/implementation.rs b/crates/uv-python/src/implementation.rs index 5001cb97c87ad..f7b6acc064839 100644 --- a/crates/uv-python/src/implementation.rs +++ b/crates/uv-python/src/implementation.rs @@ -40,7 +40,7 @@ impl ImplementationName { [Self::CPython, Self::PyPy, Self::GraalPy, Self::Pyodide].into_iter() } - pub fn pretty(self) -> &'static str { + pub(crate) fn pretty(self) -> &'static str { match self { Self::CPython => "CPython", Self::PyPy => "PyPy", @@ -50,7 +50,7 @@ impl ImplementationName { } /// The executable name used in distributions of this implementation. - pub fn executable_name(self) -> &'static str { + pub(crate) fn executable_name(self) -> &'static str { match self { Self::CPython | Self::Pyodide => "python", Self::PyPy | Self::GraalPy => self.into(), diff --git a/crates/uv-python/src/installation.rs b/crates/uv-python/src/installation.rs index 1cf4f665870dc..2ae1b389fc610 100644 --- a/crates/uv-python/src/installation.rs +++ b/crates/uv-python/src/installation.rs @@ -274,7 +274,7 @@ impl PythonInstallation { } /// Download and install the requested installation. - pub async fn fetch( + pub(crate) async fn fetch( download: &ManagedPythonDownload, client: &BaseClient, retry_policy: &ExponentialBackoff, @@ -367,7 +367,7 @@ impl PythonInstallation { /// Returns `true` if this is a managed (uv-installed) Python installation. /// /// Uses the source as a fast path, then falls back to checking the interpreter's base prefix. - pub fn is_managed(&self) -> bool { + pub(crate) fn is_managed(&self) -> bool { self.source.is_managed() || self.interpreter.is_managed() } @@ -392,7 +392,7 @@ impl PythonInstallation { } /// Return the [`Os`] of the Python installation as reported by its interpreter. - pub fn os(&self) -> Os { + pub(crate) fn os(&self) -> Os { self.interpreter.os() } @@ -532,7 +532,7 @@ pub struct PythonInstallationKey { } impl PythonInstallationKey { - pub fn new( + pub(crate) fn new( implementation: LenientImplementationName, major: u8, minor: u8, @@ -604,11 +604,11 @@ impl PythonInstallationKey { self.minor } - pub fn prerelease(&self) -> Option { + pub(crate) fn prerelease(&self) -> Option { self.prerelease } - pub fn platform(&self) -> &Platform { + pub(crate) fn platform(&self) -> &Platform { &self.platform } diff --git a/crates/uv-python/src/interpreter.rs b/crates/uv-python/src/interpreter.rs index 41e3392ad335d..f179d9667b4b0 100644 --- a/crates/uv-python/src/interpreter.rs +++ b/crates/uv-python/src/interpreter.rs @@ -114,7 +114,7 @@ impl Interpreter { } /// Return a new [`Interpreter`] to install into the given `--target` directory. - pub fn with_target(self, target: Target) -> io::Result { + pub(crate) fn with_target(self, target: Target) -> io::Result { target.init()?; Ok(Self { target: Some(target), @@ -123,7 +123,7 @@ impl Interpreter { } /// Return a new [`Interpreter`] to install into the given `--prefix` directory. - pub fn with_prefix(self, prefix: Prefix) -> io::Result { + pub(crate) fn with_prefix(self, prefix: Prefix) -> io::Result { prefix.init(self.virtualenv())?; Ok(Self { prefix: Some(prefix), @@ -200,7 +200,7 @@ impl Interpreter { } /// Returns the [`PythonInstallationKey`] for this interpreter. - pub fn key(&self) -> PythonInstallationKey { + pub(crate) fn key(&self) -> PythonInstallationKey { PythonInstallationKey::new( LenientImplementationName::from(self.implementation_name()), self.python_major(), @@ -227,17 +227,17 @@ impl Interpreter { } /// Return the [`Arch`] reported by the interpreter platform tags. - pub fn arch(&self) -> Arch { + pub(crate) fn arch(&self) -> Arch { Arch::from(&self.platform().arch()) } /// Return the [`Libc`] reported by the interpreter platform tags. - pub fn libc(&self) -> Libc { + pub(crate) fn libc(&self) -> Libc { Libc::from(self.platform().os()) } /// Return the [`Os`] reported by the interpreter platform tags. - pub fn os(&self) -> Os { + pub(crate) fn os(&self) -> Os { Os::from(self.platform().os()) } @@ -282,7 +282,7 @@ impl Interpreter { /// Returns `true` if this interpreter is managed by uv. /// /// Returns `false` if we cannot determine the path of the uv managed Python interpreters. - pub fn is_managed(&self) -> bool { + pub(crate) fn is_managed(&self) -> bool { if let Ok(test_managed) = std::env::var(uv_static::EnvVars::UV_INTERNAL__TEST_PYTHON_MANAGED) { @@ -480,12 +480,12 @@ impl Interpreter { } /// Return the `purelib` path for this Python interpreter, as returned by `sysconfig.get_paths()`. - pub fn purelib(&self) -> &Path { + pub(crate) fn purelib(&self) -> &Path { &self.scheme.purelib } /// Return the `platlib` path for this Python interpreter, as returned by `sysconfig.get_paths()`. - pub fn platlib(&self) -> &Path { + pub(crate) fn platlib(&self) -> &Path { &self.scheme.platlib } @@ -495,12 +495,12 @@ impl Interpreter { } /// Return the `data` path for this Python interpreter, as returned by `sysconfig.get_paths()`. - pub fn data(&self) -> &Path { + pub(crate) fn data(&self) -> &Path { &self.scheme.data } /// Return the `include` path for this Python interpreter, as returned by `sysconfig.get_paths()`. - pub fn include(&self) -> &Path { + pub(crate) fn include(&self) -> &Path { &self.scheme.include } @@ -535,12 +535,12 @@ impl Interpreter { } /// Return the `--target` directory for this interpreter, if any. - pub fn target(&self) -> Option<&Target> { + pub(crate) fn target(&self) -> Option<&Target> { self.target.as_ref() } /// Return the `--prefix` directory for this interpreter, if any. - pub fn prefix(&self) -> Option<&Prefix> { + pub(crate) fn prefix(&self) -> Option<&Prefix> { self.prefix.as_ref() } diff --git a/crates/uv-python/src/managed.rs b/crates/uv-python/src/managed.rs index eccc378ed6550..2377810a81321 100644 --- a/crates/uv-python/src/managed.rs +++ b/crates/uv-python/src/managed.rs @@ -464,7 +464,7 @@ impl ManagedPythonInstallation { } /// The [`PythonVersion`] of the toolchain. - pub fn version(&self) -> PythonVersion { + pub(crate) fn version(&self) -> PythonVersion { self.key.version() } @@ -485,7 +485,7 @@ impl ManagedPythonInstallation { &self.key } - pub fn platform(&self) -> &Platform { + pub(crate) fn platform(&self) -> &Platform { self.key.platform() } diff --git a/crates/uv-python/src/prefix.rs b/crates/uv-python/src/prefix.rs index e0b9568b0b068..dd4e3a6b526f7 100644 --- a/crates/uv-python/src/prefix.rs +++ b/crates/uv-python/src/prefix.rs @@ -9,7 +9,7 @@ pub struct Prefix(PathBuf); impl Prefix { /// Return the [`Scheme`] for the `--prefix` directory. - pub fn scheme(&self, virtualenv: &Scheme) -> Scheme { + pub(crate) fn scheme(&self, virtualenv: &Scheme) -> Scheme { Scheme { purelib: self.0.join(&virtualenv.purelib), platlib: self.0.join(&virtualenv.platlib), @@ -20,12 +20,12 @@ impl Prefix { } /// Return an iterator over the `site-packages` directories inside the environment. - pub fn site_packages(&self, virtualenv: &Scheme) -> impl Iterator { + pub(crate) fn site_packages(&self, virtualenv: &Scheme) -> impl Iterator { std::iter::once(self.0.join(&virtualenv.purelib)) } /// Initialize the `--prefix` directory. - pub fn init(&self, virtualenv: &Scheme) -> std::io::Result<()> { + pub(crate) fn init(&self, virtualenv: &Scheme) -> std::io::Result<()> { for site_packages in self.site_packages(virtualenv) { fs_err::create_dir_all(site_packages)?; } diff --git a/crates/uv-python/src/python_version.rs b/crates/uv-python/src/python_version.rs index 9b17dc044a839..e8ba6b9e63f08 100644 --- a/crates/uv-python/src/python_version.rs +++ b/crates/uv-python/src/python_version.rs @@ -188,7 +188,7 @@ impl PythonVersion { } /// Return the full parsed Python version. - pub fn into_version(self) -> Version { + pub(crate) fn into_version(self) -> Version { self.0.version } diff --git a/crates/uv-python/src/target.rs b/crates/uv-python/src/target.rs index dbca407de2545..1714d15b37ed6 100644 --- a/crates/uv-python/src/target.rs +++ b/crates/uv-python/src/target.rs @@ -9,7 +9,7 @@ pub struct Target(PathBuf); impl Target { /// Return the [`Scheme`] for the `--target` directory. - pub fn scheme(&self) -> Scheme { + pub(crate) fn scheme(&self) -> Scheme { Scheme { purelib: self.0.clone(), platlib: self.0.clone(), @@ -20,12 +20,12 @@ impl Target { } /// Return an iterator over the `site-packages` directories inside the environment. - pub fn site_packages(&self) -> impl Iterator { + pub(crate) fn site_packages(&self) -> impl Iterator { std::iter::once(self.0.as_path()) } /// Initialize the `--target` directory. - pub fn init(&self) -> std::io::Result<()> { + pub(crate) fn init(&self) -> std::io::Result<()> { fs_err::create_dir_all(&self.0)?; Ok(()) } diff --git a/crates/uv-python/src/version_files.rs b/crates/uv-python/src/version_files.rs index 6541cbfc44d99..aca1413fdbc8d 100644 --- a/crates/uv-python/src/version_files.rs +++ b/crates/uv-python/src/version_files.rs @@ -158,7 +158,7 @@ impl PythonVersionFile { /// Try to read a Python version file at the given path. /// /// If the file does not exist, `Ok(None)` is returned. - pub async fn try_from_path(path: PathBuf) -> Result, std::io::Error> { + pub(crate) async fn try_from_path(path: PathBuf) -> Result, std::io::Error> { match fs::tokio::read_to_string(&path).await { Ok(content) => { debug!( diff --git a/crates/uv-python/src/virtualenv.rs b/crates/uv-python/src/virtualenv.rs index f6e541533fc26..2bc323b479eeb 100644 --- a/crates/uv-python/src/virtualenv.rs +++ b/crates/uv-python/src/virtualenv.rs @@ -316,7 +316,7 @@ impl PyVenvConfiguration { } /// Set the key-value pair in the `pyvenv.cfg` file. - pub fn set(content: &str, key: &str, value: &str) -> String { + pub(crate) fn set(content: &str, key: &str, value: &str) -> String { let mut lines = content.lines().map(Cow::Borrowed).collect::>(); let mut found = false; for line in &mut lines { diff --git a/crates/uv-requirements-txt/src/requirement.rs b/crates/uv-requirements-txt/src/requirement.rs index dc9523017569c..ebb1b04232f5d 100644 --- a/crates/uv-requirements-txt/src/requirement.rs +++ b/crates/uv-requirements-txt/src/requirement.rs @@ -50,7 +50,7 @@ pub enum RequirementsTxtRequirement { impl RequirementsTxtRequirement { /// Set the source file containing the requirement. #[must_use] - pub fn with_origin(self, origin: RequirementOrigin) -> Self { + pub(crate) fn with_origin(self, origin: RequirementOrigin) -> Self { match self { Self::Named(requirement) => Self::Named(requirement.with_origin(origin)), Self::Unnamed(requirement) => Self::Unnamed(requirement.with_origin(origin)), diff --git a/crates/uv-requirements/src/source_tree.rs b/crates/uv-requirements/src/source_tree.rs index 414c8c2f96ff3..542889529cfa1 100644 --- a/crates/uv-requirements/src/source_tree.rs +++ b/crates/uv-requirements/src/source_tree.rs @@ -29,7 +29,7 @@ pub enum SourceTree { impl SourceTree { /// Return the [`Path`] to the file representing the source tree (e.g., the `pyproject.toml`). - pub fn path(&self) -> &Path { + pub(crate) fn path(&self) -> &Path { match self { Self::PyProjectToml(path, ..) => path, Self::SetupPy(path) => path, @@ -38,7 +38,7 @@ impl SourceTree { } /// Return the [`PyProjectToml`] if this is a `pyproject.toml`-based source tree. - pub fn pyproject_toml(&self) -> Option<&PyProjectToml> { + pub(crate) fn pyproject_toml(&self) -> Option<&PyProjectToml> { match self { Self::PyProjectToml(.., toml) => Some(toml), _ => None, diff --git a/crates/uv-resolver/src/error.rs b/crates/uv-resolver/src/error.rs index e91adf08757a2..65f16069d116e 100644 --- a/crates/uv-resolver/src/error.rs +++ b/crates/uv-resolver/src/error.rs @@ -417,7 +417,7 @@ impl NoSolutionError { } /// Return the computed PubGrub hints. - pub fn pubgrub_hints(&self) -> &IndexSet { + pub(crate) fn pubgrub_hints(&self) -> &IndexSet { &self.cached().1 } @@ -1153,7 +1153,7 @@ impl SentinelRange<'_> { /// Returns `true` if the range appears to be, e.g., `>1.0.0, <1.0.0+[max]` (i.e., a sentinel /// range with the non-local version removed). - pub fn is_complement(&self) -> bool { + pub(crate) fn is_complement(&self) -> bool { self.0.iter().all(|(lower, upper)| { let (Bound::Excluded(lower), Bound::Excluded(upper)) = (lower, upper) else { return false; @@ -1325,7 +1325,7 @@ pub struct NoSolutionHeader { impl NoSolutionHeader { /// Create a new [`NoSolutionHeader`] with the given [`ResolverEnvironment`]. - pub fn new(env: ResolverEnvironment) -> Self { + pub(crate) fn new(env: ResolverEnvironment) -> Self { Self { env, context: None } } diff --git a/crates/uv-resolver/src/exclude_newer.rs b/crates/uv-resolver/src/exclude_newer.rs index 9114edd345db9..8c8f9536ded0b 100644 --- a/crates/uv-resolver/src/exclude_newer.rs +++ b/crates/uv-resolver/src/exclude_newer.rs @@ -37,7 +37,7 @@ pub enum ExcludeNewerValueChange { } impl ExcludeNewerValueChange { - pub fn is_relative_timestamp_change(&self) -> bool { + pub(crate) fn is_relative_timestamp_change(&self) -> bool { matches!(self, Self::RelativeTimestampChanged(_, _, _)) } } @@ -114,7 +114,7 @@ pub enum ExcludeNewerPackageChange { } impl ExcludeNewerPackageChange { - pub fn is_relative_timestamp_change(&self) -> bool { + pub(crate) fn is_relative_timestamp_change(&self) -> bool { match self { Self::PackageAdded(_, _) | Self::PackageRemoved(_) => false, Self::PackageChanged(_, change) => change.is_relative_timestamp_change(), @@ -269,7 +269,7 @@ pub enum ExcludeNewerOverrideChange { } impl ExcludeNewerOverrideChange { - pub fn is_relative_timestamp_change(&self) -> bool { + pub(crate) fn is_relative_timestamp_change(&self) -> bool { match self { Self::Disabled { .. } | Self::Enabled { .. } => false, Self::TimestampChanged(change) => change.is_relative_timestamp_change(), @@ -348,7 +348,7 @@ impl ExcludeNewerPackage { self.0.is_empty() } - pub fn compare(&self, other: &Self) -> Option { + pub(crate) fn compare(&self, other: &Self) -> Option { for (package, setting) in self { match (setting, other.get(package)) { ( @@ -453,7 +453,7 @@ impl ExcludeNewer { /// Returns the effective exclude-newer timestamp for a specific package, falling back to the /// global value if no package-specific setting exists. - pub fn exclude_newer_package(&self, package_name: &PackageName) -> Option { + pub(crate) fn exclude_newer_package(&self, package_name: &PackageName) -> Option { match self.package.get(package_name) { Some(ExcludeNewerOverride::Enabled(value)) => Some(value.timestamp()), Some(ExcludeNewerOverride::Disabled) => None, @@ -504,7 +504,7 @@ impl ExcludeNewer { } /// Returns true if this has any configuration (global or per-package). - pub fn is_empty(&self) -> bool { + pub(crate) fn is_empty(&self) -> bool { self.global.is_none() && self.package.is_empty() } diff --git a/crates/uv-resolver/src/exclusions.rs b/crates/uv-resolver/src/exclusions.rs index f815ee7836cdf..511a16cbf2a68 100644 --- a/crates/uv-resolver/src/exclusions.rs +++ b/crates/uv-resolver/src/exclusions.rs @@ -15,11 +15,11 @@ impl Exclusions { Self { reinstall, upgrade } } - pub fn reinstall(&self, package: &PackageName) -> bool { + pub(crate) fn reinstall(&self, package: &PackageName) -> bool { self.reinstall.contains_package(package) } - pub fn upgrade(&self, package: &PackageName) -> bool { + pub(crate) fn upgrade(&self, package: &PackageName) -> bool { self.upgrade.contains(package) } diff --git a/crates/uv-resolver/src/flat_index.rs b/crates/uv-resolver/src/flat_index.rs index 8e677da2664f1..b2623b96c3c00 100644 --- a/crates/uv-resolver/src/flat_index.rs +++ b/crates/uv-resolver/src/flat_index.rs @@ -51,13 +51,13 @@ impl FlatIndex { } /// Get the [`FlatDistributions`] for the given package name. - pub fn get(&self, package_name: &PackageName) -> Option<&FlatDistributions> { + pub(crate) fn get(&self, package_name: &PackageName) -> Option<&FlatDistributions> { self.index.get(package_name) } /// Whether any `--find-links` entries could not be resolved due to a lack of network /// connectivity. - pub fn offline(&self) -> bool { + pub(crate) fn offline(&self) -> bool { self.offline } } @@ -70,7 +70,7 @@ pub struct FlatDistributions(BTreeMap); impl FlatDistributions { /// Collect all files from a `--find-links` target into a [`FlatIndex`]. #[instrument(skip_all)] - pub fn from_entries( + pub(crate) fn from_entries( entries: Vec, tags: Option<&Tags>, hasher: &HashStrategy, @@ -85,7 +85,7 @@ impl FlatDistributions { } /// Returns an [`Iterator`] over the distributions. - pub fn iter(&self) -> impl Iterator { + pub(crate) fn iter(&self) -> impl Iterator { self.0.iter() } diff --git a/crates/uv-resolver/src/lock/mod.rs b/crates/uv-resolver/src/lock/mod.rs index 796af43b72a38..11a5b6f4e6f79 100644 --- a/crates/uv-resolver/src/lock/mod.rs +++ b/crates/uv-resolver/src/lock/mod.rs @@ -702,7 +702,7 @@ impl Lock { } /// Returns the lockfile revision. - pub fn revision(&self) -> u32 { + pub(crate) fn revision(&self) -> u32 { self.revision } @@ -759,7 +759,7 @@ impl Lock { } /// Returns the required platforms that were used to generate this lock. - pub fn required_environments(&self) -> &[MarkerTree] { + pub(crate) fn required_environments(&self) -> &[MarkerTree] { &self.required_environments } @@ -769,12 +769,12 @@ impl Lock { } /// Returns the dependency groups that were used to generate this lock. - pub fn requirements(&self) -> &BTreeSet { + pub(crate) fn requirements(&self) -> &BTreeSet { &self.manifest.requirements } /// Returns the dependency groups that were used to generate this lock. - pub fn dependency_groups(&self) -> &BTreeMap> { + pub(crate) fn dependency_groups(&self) -> &BTreeMap> { &self.manifest.dependency_groups } @@ -3613,7 +3613,7 @@ impl Package { } /// Return the fork markers for this package, if any. - pub fn fork_markers(&self) -> &[UniversalMarker] { + pub(crate) fn fork_markers(&self) -> &[UniversalMarker] { self.fork_markers.as_slice() } diff --git a/crates/uv-resolver/src/manifest.rs b/crates/uv-resolver/src/manifest.rs index 47008a77b1e14..0b46250035ce0 100644 --- a/crates/uv-resolver/src/manifest.rs +++ b/crates/uv-resolver/src/manifest.rs @@ -111,7 +111,7 @@ impl Manifest { /// - Determining which requirements should allow yanked versions. /// - Determining which requirements should allow pre-release versions (e.g., `torch>=2.2.0a1`). /// - Determining which requirements should allow direct URLs (e.g., `torch @ https://...`). - pub fn requirements<'a>( + pub(crate) fn requirements<'a>( &'a self, env: &'a ResolverEnvironment, mode: DependencyMode, @@ -172,7 +172,7 @@ impl Manifest { } /// Only the overrides from [`Self::requirements`]. - pub fn overrides<'a>( + pub(crate) fn overrides<'a>( &'a self, env: &'a ResolverEnvironment, mode: DependencyMode, diff --git a/crates/uv-resolver/src/preferences.rs b/crates/uv-resolver/src/preferences.rs index c5fc760ee3f01..b358de444f7f5 100644 --- a/crates/uv-resolver/src/preferences.rs +++ b/crates/uv-resolver/src/preferences.rs @@ -140,15 +140,10 @@ impl Preference { pub fn name(&self) -> &PackageName { &self.name } - - /// Return the [`Version`] of the package for this [`Preference`]. - pub fn version(&self) -> &Version { - &self.version - } } #[derive(Debug, Clone)] -pub enum PreferenceIndex { +pub(crate) enum PreferenceIndex { /// The preference should match to any index. Any, /// The preference should match to an implicit index. @@ -311,7 +306,7 @@ impl Preferences { } /// Returns an iterator over the preferences. - pub fn iter( + pub(crate) fn iter( &self, ) -> impl Iterator< Item = ( diff --git a/crates/uv-resolver/src/python_requirement.rs b/crates/uv-resolver/src/python_requirement.rs index fcd20a2344dfd..26b3c694d8eb3 100644 --- a/crates/uv-resolver/src/python_requirement.rs +++ b/crates/uv-resolver/src/python_requirement.rs @@ -101,7 +101,7 @@ impl PythonRequirement { /// than the current `Requires-Python` minimum. /// /// Returns `None` if the given range is not narrower than the current range. - pub fn narrow(&self, target: &RequiresPythonRange) -> Option { + pub(crate) fn narrow(&self, target: &RequiresPythonRange) -> Option { Some(Self { exact: self.exact.clone(), installed: self.installed.clone(), @@ -114,7 +114,7 @@ impl PythonRequirement { /// /// For example, if the current requirement is `>=3.10`, and the split point is `3.11`, then /// the result will be `>=3.10 and <3.11` and `>=3.11`. - pub fn split(&self, at: Bound) -> Option<(Self, Self)> { + pub(crate) fn split(&self, at: Bound) -> Option<(Self, Self)> { let (lower, upper) = self.target.split(at)?; Some(( Self { @@ -134,27 +134,27 @@ impl PythonRequirement { /// Returns `true` if the minimum version of Python required by the target is greater than the /// installed version. - pub fn raises(&self, target: &RequiresPythonRange) -> bool { + pub(crate) fn raises(&self, target: &RequiresPythonRange) -> bool { target.lower() > self.target.range().lower() } /// Return the exact version of Python. - pub fn exact(&self) -> &Version { + pub(crate) fn exact(&self) -> &Version { &self.exact } /// Return the installed version of Python. - pub fn installed(&self) -> &RequiresPython { + pub(crate) fn installed(&self) -> &RequiresPython { &self.installed } /// Return the target version of Python. - pub fn target(&self) -> &RequiresPython { + pub(crate) fn target(&self) -> &RequiresPython { &self.target } /// Return the source of the [`PythonRequirement`]. - pub fn source(&self) -> PythonRequirementSource { + pub(crate) fn source(&self) -> PythonRequirementSource { self.source } @@ -170,7 +170,7 @@ impl PythonRequirement { /// Return a [`MarkerTree`] representing the Python requirement. /// /// See: [`RequiresPython::to_marker_tree`] - pub fn to_marker_tree(&self) -> MarkerTree { + pub(crate) fn to_marker_tree(&self) -> MarkerTree { self.target.to_marker_tree() } } diff --git a/crates/uv-resolver/src/resolver/index.rs b/crates/uv-resolver/src/resolver/index.rs index d70f61b136531..4e944727702f7 100644 --- a/crates/uv-resolver/src/resolver/index.rs +++ b/crates/uv-resolver/src/resolver/index.rs @@ -28,12 +28,12 @@ pub(crate) type FxOnceMap = OnceMap>; impl InMemoryIndex { /// Returns a reference to the package metadata map. - pub fn implicit(&self) -> &FxOnceMap> { + pub(crate) fn implicit(&self) -> &FxOnceMap> { &self.0.implicit } /// Returns a reference to the package metadata map. - pub fn explicit(&self) -> &FxOnceMap<(PackageName, IndexUrl), Arc> { + pub(crate) fn explicit(&self) -> &FxOnceMap<(PackageName, IndexUrl), Arc> { &self.0.explicit } diff --git a/crates/uv-resolver/src/resolver/provider.rs b/crates/uv-resolver/src/resolver/provider.rs index 51ca63123613b..4570858b54c77 100644 --- a/crates/uv-resolver/src/resolver/provider.rs +++ b/crates/uv-resolver/src/resolver/provider.rs @@ -126,7 +126,7 @@ pub struct DefaultResolverProvider<'a, Context: BuildContext> { impl<'a, Context: BuildContext> DefaultResolverProvider<'a, Context> { /// Reads the flat index entries and builds the provider. - pub fn new( + pub(crate) fn new( fetcher: DistributionDatabase<'a, Context>, flat_index: &'a FlatIndex, tags: Option<&'a Tags>, diff --git a/crates/uv-resolver/src/universal_marker.rs b/crates/uv-resolver/src/universal_marker.rs index f400238633a9c..bc3178071a6d9 100644 --- a/crates/uv-resolver/src/universal_marker.rs +++ b/crates/uv-resolver/src/universal_marker.rs @@ -359,7 +359,7 @@ impl UniversalMarker { /// producing different versions of the same package), then one should /// always use a universal marker since it accounts for all possible ways /// for a package to be installed. - pub fn pep508(self) -> MarkerTree { + pub(crate) fn pep508(self) -> MarkerTree { self.pep508 } @@ -436,7 +436,7 @@ impl ConflictMarker { /// Create a conflict marker that is true only when the production /// dependencies for the given package are activated. - pub fn project(package: &PackageName) -> Self { + pub(crate) fn project(package: &PackageName) -> Self { let operator = uv_pep508::ExtraOperator::Equal; let name = uv_pep508::MarkerValueExtra::Extra(encode_project(package)); let expr = uv_pep508::MarkerExpression::Extra { operator, name }; @@ -446,7 +446,7 @@ impl ConflictMarker { /// Create a conflict marker that is true only when the given extra for the /// given package is activated. - pub fn extra(package: &PackageName, extra: &ExtraName) -> Self { + pub(crate) fn extra(package: &PackageName, extra: &ExtraName) -> Self { let operator = uv_pep508::ExtraOperator::Equal; let name = uv_pep508::MarkerValueExtra::Extra(encode_package_extra(package, extra)); let expr = uv_pep508::MarkerExpression::Extra { operator, name }; @@ -456,7 +456,7 @@ impl ConflictMarker { /// Create a conflict marker that is true only when the given group for the /// given package is activated. - pub fn group(package: &PackageName, group: &GroupName) -> Self { + pub(crate) fn group(package: &PackageName, group: &GroupName) -> Self { let operator = uv_pep508::ExtraOperator::Equal; let name = uv_pep508::MarkerValueExtra::Extra(encode_package_group(package, group)); let expr = uv_pep508::MarkerExpression::Extra { operator, name }; @@ -466,7 +466,7 @@ impl ConflictMarker { /// Returns a new conflict marker that is the negation of this one. #[must_use] - pub fn negate(self) -> Self { + pub(crate) fn negate(self) -> Self { Self { marker: self.marker.negate(), } @@ -475,7 +475,7 @@ impl ConflictMarker { /// Returns a new conflict marker corresponding to the union of `self` and /// `other`. #[must_use] - pub fn or(self, other: Self) -> Self { + pub(crate) fn or(self, other: Self) -> Self { let mut marker = self.marker; marker.or(other.marker); Self { marker } @@ -484,7 +484,7 @@ impl ConflictMarker { /// Returns a new conflict marker corresponding to the intersection of /// `self` and `other`. #[must_use] - pub fn and(self, other: Self) -> Self { + pub(crate) fn and(self, other: Self) -> Self { let mut marker = self.marker; marker.and(other.marker); Self { marker } @@ -503,7 +503,7 @@ impl ConflictMarker { } /// Returns true if this conflict marker will always evaluate to `true`. - pub fn is_true(self) -> bool { + pub(crate) fn is_true(self) -> bool { self.marker.is_true() } diff --git a/crates/uv-resolver/src/yanks.rs b/crates/uv-resolver/src/yanks.rs index b7efc7c0a3319..33427b34f17e6 100644 --- a/crates/uv-resolver/src/yanks.rs +++ b/crates/uv-resolver/src/yanks.rs @@ -52,7 +52,7 @@ impl AllowedYanks { } /// Returns `true` if the package-version is allowed, even if it's marked as yanked. - pub fn contains(&self, package_name: &PackageName, version: &Version) -> bool { + pub(crate) fn contains(&self, package_name: &PackageName, version: &Version) -> bool { self.0 .get(package_name) .is_some_and(|versions| versions.contains(version)) diff --git a/crates/uv-settings/src/lib.rs b/crates/uv-settings/src/lib.rs index 811f754b04f18..4da914ed630b2 100644 --- a/crates/uv-settings/src/lib.rs +++ b/crates/uv-settings/src/lib.rs @@ -124,7 +124,7 @@ impl FilesystemOptions { /// Load a [`FilesystemOptions`] from a directory, preferring a `uv.toml` file over a /// `pyproject.toml` file. - pub fn from_directory(dir: &Path) -> Result, Error> { + pub(crate) fn from_directory(dir: &Path) -> Result, Error> { // Read a `uv.toml` file in the current directory. let path = dir.join("uv.toml"); match fs_err::read_to_string(&path) { @@ -705,7 +705,7 @@ pub struct EnvFlag { impl EnvFlag { /// Create a new [`EnvFlag`] by parsing the given environment variable. - pub fn new(env_var: &'static str) -> Result { + pub(crate) fn new(env_var: &'static str) -> Result { Ok(Self { value: parse_boolish_environment_variable(env_var)?, env_var, diff --git a/crates/uv-settings/src/settings.rs b/crates/uv-settings/src/settings.rs index c8a92cc94b783..fb3468a5e2c9d 100644 --- a/crates/uv-settings/src/settings.rs +++ b/crates/uv-settings/src/settings.rs @@ -202,7 +202,7 @@ impl Options { /// Set the [`Origin`] on all indexes without an existing origin. #[must_use] - pub fn with_origin(mut self, origin: Origin) -> Self { + pub(crate) fn with_origin(mut self, origin: Origin) -> Self { if let Some(indexes) = &mut self.top_level.index { for index in indexes { index.origin.get_or_insert(origin); @@ -235,7 +235,7 @@ impl Options { } /// Resolve the [`Options`] relative to the given root directory. - pub fn relative_to(self, root_dir: &Path) -> Result { + pub(crate) fn relative_to(self, root_dir: &Path) -> Result { Ok(Self { top_level: self.top_level.relative_to(root_dir)?, pip: self.pip.map(|pip| pip.relative_to(root_dir)).transpose()?, @@ -608,7 +608,7 @@ impl From for ResolverInstallerOptions { impl ResolverInstallerSchema { /// Resolve the [`ResolverInstallerSchema`] relative to the given root directory. - pub fn relative_to(self, root_dir: &Path) -> Result { + pub(crate) fn relative_to(self, root_dir: &Path) -> Result { Ok(Self { index: self .index @@ -1998,7 +1998,7 @@ pub struct PipOptions { impl PipOptions { /// Resolve the [`PipOptions`] relative to the given root directory. - pub fn relative_to(self, root_dir: &Path) -> Result { + pub(crate) fn relative_to(self, root_dir: &Path) -> Result { Ok(Self { index: self .index diff --git a/crates/uv-toml/src/lib.rs b/crates/uv-toml/src/lib.rs index d7ebe90d537f3..7711d9380ce24 100644 --- a/crates/uv-toml/src/lib.rs +++ b/crates/uv-toml/src/lib.rs @@ -61,7 +61,7 @@ impl<'s> DetectToml11<'s> { } } - pub fn is_11(&self) -> bool { + pub(crate) fn is_11(&self) -> bool { self.toml11 } } diff --git a/crates/uv-tool/src/lib.rs b/crates/uv-tool/src/lib.rs index 3fbc13f3f06ec..12bad72a6ee46 100644 --- a/crates/uv-tool/src/lib.rs +++ b/crates/uv-tool/src/lib.rs @@ -33,7 +33,7 @@ pub struct ToolEnvironment { } impl ToolEnvironment { - pub fn new(environment: PythonEnvironment, name: PackageName) -> Self { + pub(crate) fn new(environment: PythonEnvironment, name: PackageName) -> Self { Self { environment, name } } diff --git a/crates/uv-workspace/src/dependency_groups.rs b/crates/uv-workspace/src/dependency_groups.rs index e6346d8a83895..d52fc22273f00 100644 --- a/crates/uv-workspace/src/dependency_groups.rs +++ b/crates/uv-workspace/src/dependency_groups.rs @@ -224,12 +224,12 @@ impl FlatDependencyGroups { } /// Return the entry for a given group, if any. - pub fn entry(&mut self, group: GroupName) -> Entry<'_, GroupName, FlatDependencyGroup> { + pub(crate) fn entry(&mut self, group: GroupName) -> Entry<'_, GroupName, FlatDependencyGroup> { self.0.entry(group) } /// Consume the [`FlatDependencyGroups`] and return the inner map. - pub fn into_inner(self) -> BTreeMap { + pub(crate) fn into_inner(self) -> BTreeMap { self.0 } } diff --git a/crates/uv-workspace/src/pyproject.rs b/crates/uv-workspace/src/pyproject.rs index 11db8a05cb91e..882d2d8a14502 100644 --- a/crates/uv-workspace/src/pyproject.rs +++ b/crates/uv-workspace/src/pyproject.rs @@ -187,7 +187,7 @@ impl PyProjectToml { } /// Returns the set of conflicts for the project. - pub fn conflicts(&self) -> Conflicts { + pub(crate) fn conflicts(&self) -> Conflicts { let empty = Conflicts::empty(); let Some(project) = self.project.as_ref() else { return empty; @@ -776,7 +776,7 @@ impl ToolUvSources { /// Convert the [`ToolUvSources`] into its inner `BTreeMap`. #[must_use] - pub fn into_inner(self) -> BTreeMap { + pub(crate) fn into_inner(self) -> BTreeMap { self.0 } } diff --git a/crates/uv-workspace/src/pyproject_mut.rs b/crates/uv-workspace/src/pyproject_mut.rs index 6417ae9563934..306a76f39120f 100644 --- a/crates/uv-workspace/src/pyproject_mut.rs +++ b/crates/uv-workspace/src/pyproject_mut.rs @@ -1251,7 +1251,7 @@ fn implicit() -> Item { /// Adds a dependency to the given `deps` array. /// /// Returns `true` if the dependency was added, `false` if it was updated. -pub fn add_dependency( +pub(crate) fn add_dependency( req: &Requirement, deps: &mut Array, has_source: bool, diff --git a/crates/uv-workspace/src/workspace.rs b/crates/uv-workspace/src/workspace.rs index c54ac6dfce88d..e3583ec7bfccf 100644 --- a/crates/uv-workspace/src/workspace.rs +++ b/crates/uv-workspace/src/workspace.rs @@ -298,7 +298,7 @@ impl Workspace { /// Set the [`ProjectWorkspace`] for a given workspace member. /// /// Assumes that the project name is unchanged in the updated [`PyProjectToml`]. - pub fn update_member( + pub(crate) fn update_member( self, package_name: &PackageName, pyproject_toml: PyProjectToml, @@ -468,7 +468,7 @@ impl Workspace { } /// Whether a given workspace member is required by another member. - pub fn is_required_member(&self, name: &PackageName) -> bool { + pub(crate) fn is_required_member(&self, name: &PackageName) -> bool { self.required_members().contains_key(name) } @@ -1397,7 +1397,7 @@ impl ProjectWorkspace { /// Set the `pyproject.toml` for the current project. /// /// Assumes that the project name is unchanged in the updated [`PyProjectToml`]. - pub fn update_member( + pub(crate) fn update_member( self, pyproject_toml: PyProjectToml, ) -> Result, WorkspaceError> { diff --git a/hawk.toml b/hawk.toml new file mode 100644 index 0000000000000..31fc1671f360e --- /dev/null +++ b/hawk.toml @@ -0,0 +1,2047 @@ +# Hawk analyzes the `uv` binary as a closed world; retain public API outside that graph. +# Keep each retained finding expected so removing it requires deleting this entry. + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_auth" +item = "cache::CredentialsCache::new" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_auth" +item = "middleware::AuthMiddleware::with_cache" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_cache" +item = "Cache::temp" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_cache" +item = "Cache::refresh" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_cache" +item = "Refresh::timestamp" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_cache" +item = "Refresh::is_none" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_cli" +item = "options::Flag::name" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "base_client::BaseClientBuilder::<'a>::no_retry_delay" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "base_client::BaseClientBuilder::<'a>::with_system_certs" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "base_client::BaseClientBuilder::<'a>::extra_middleware" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "base_client::BaseClientBuilder::<'a>::proxy" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "base_client::BaseClient::connect_timeout" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_client" +item = "base_client::BaseClient::retry_policy" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "base_client::RequestBuilder::<'a>::headers" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "base_client::RequestBuilder::<'a>::version" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "base_client::RequestBuilder::<'a>::raw_builder" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_client" +item = "error::WrappedReqwestError::with_problem_details" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "registry_client::RegistryClientBuilder::<'a>::with_reqwest_client" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "registry_client::RegistryClientBuilder::<'a>::extra_middleware" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "registry_client::RegistryClientBuilder::<'a>::proxy" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "registry_client::RegistryClient::fetch_simple_index" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "registry_client::SimpleIndexMetadata::iter" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "registry_client::SimpleDetailMetadata::project_status" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "rkyvutil::OwnedArchive::::from_reader" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "rkyvutil::OwnedArchive::::write" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_configuration" +item = "dependency_groups::DependencyGroupsInner::is_empty" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_configuration" +item = "dependency_groups::IncludeGroups::is_empty" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_configuration" +item = "dependency_groups::IncludeGroups::names" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_configuration" +item = "excludes::Excludes::iter" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_configuration" +item = "extras::ExtrasSpecificationWithDefaults::none" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_configuration" +item = "extras::ExtrasSpecificationWithDefaults::contains_because_default" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_configuration" +item = "extras::IncludeExtras::names" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_configuration" +item = "package_options::Reinstall::is_all" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_configuration" +item = "package_options::Upgrade::all" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_dispatch" +item = "BuildDispatch::<'a>::with_build_extra_env_vars" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_dispatch" +item = "SharedState::capabilities" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_dispatch" +item = "SharedState::build_arena" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "buildable::SourceUrl::<'_>::is_local" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "config_settings::ConfigSettings::len" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "config_settings::PackageConfigSettings::is_empty" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "dist_error::DerivationChain::len" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_distribution_types" +item = "file::FileLocation::new" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "index::Index::into_url" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "index::IndexMetadata::as_ref" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "index::IndexMetadataRef::<'_>::url" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_distribution_types" +item = "index_url::IndexUrl::parse" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "index_url::IndexLocations::simple_api_cache_control_for" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "installed::InstalledDist::cache_info" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "installed::InstalledDist::read_installer" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "known_platform::KnownPlatform::sys_platform" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "VersionOrUrlRef::<'a, T>::url" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "InstalledVersion::<'a>::url" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "Dist::as_ref" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "requirement::Requirement::is_editable" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "requirement::RequirementSource::version_or_url" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "requirement::RequirementSource::is_editable" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_distribution_types" +item = "requires_python::RequiresPythonRange::upper" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "resolution::Resolution::is_empty" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "resolution::Node::install" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "specified_requirement::UnresolvedRequirement::extras" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "specified_requirement::UnresolvedRequirement::source" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "specified_requirement::UnresolvedRequirement::is_editable" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "specified_requirement::NameRequirementSpecification::hashes" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution" +item = "download::LocalWheel::target" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution" +item = "download::LocalWheel::filename" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution" +item = "metadata::requires_dist::RequiresDist::from_metadata23" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution" +item = "metadata::requires_dist::FlatRequiresDist::into_inner" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_fastid" +item = "Id::secure" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_fs" +item = "with_retry_sync" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_fs" +item = "copy_dir_all" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_installer" +item = "installer::Installer::<'a>::with_installer_name" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "credential::nop_credential_builder" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "set_default_credential_builder" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "Entry::new_with_target" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "Entry::new_with_credential" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "Entry::set_secret" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "Entry::get_secret" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "Entry::get_attributes" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "Entry::update_attributes" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "Entry::get_credential" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "macos::MacCredential::get_credential" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "mock::MockCredential::set_error" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "mock::default_credential_builder" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_netrc" +item = "::from_file" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_netrc" +item = "netrc::Authenticator::new" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_options_metadata" +item = "OptionSet::record" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_options_metadata" +item = "OptionSet::documentation" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pep440" +item = "version::VersionPattern::verbatim" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pep440" +item = "version::VersionPattern::wildcard" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pep440" +item = "version::LocalVersion::clear" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pep440" +item = "version_specifier::VersionSpecifier::into_parts" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pep508" +item = "Extras::parse" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pep508" +item = "marker::tree::MarkerExpression::from_str" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pep508" +item = "marker::tree::MarkerTree::parse_str" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pep508" +item = "marker::tree::MarkerTree::simplify_not_extras" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pep508" +item = "unnamed::UnnamedRequirement::::evaluate_markers" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pep508" +item = "verbatim_url::VerbatimUrl::into_url" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_platform" +item = "arch::Arch::is_arm" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_platform" +item = "os::Os::from_env" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_preview" +item = "Preview::new" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_preview" +item = "Preview::all" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_pypi_types" +item = "conflicts::Conflicts::push" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pypi_types" +item = "conflicts::ConflictSet::pair" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pypi_types" +item = "conflicts::ConflictItemRef::<'a>::extra" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pypi_types" +item = "conflicts::ConflictItemRef::<'a>::group" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pypi_types" +item = "conflicts::ConflictKindRef::<'a>::extra" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pypi_types" +item = "conflicts::ConflictKindRef::<'a>::group" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pypi_types" +item = "dependency_groups::DependencyGroups::get" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pypi_types" +item = "dependency_groups::DependencyGroups::iter" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pypi_types" +item = "supported_environments::SupportedEnvironments::len" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "downloads::PythonDownloadRequest::os" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "downloads::ManagedPythonDownload::fetch" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "downloads::ManagedPythonDownload::python_version" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "downloads::ManagedPythonDownload::download_url" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "installation::PythonInstallation::from_interpreter" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "installation::PythonInstallation::arch" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "installation::PythonInstallation::libc" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "interpreter::Interpreter::satisfies" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "managed::ManagedPythonInstallations::temp" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "managed::ManagedPythonInstallation::satisfies" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "managed::ManagedPythonInstallation::url" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "managed::ManagedPythonInstallation::sha256" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "managed::platform_key_from_env" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "version_files::PythonVersionFile::from_path" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "virtualenv::PyVenvConfiguration::is_virtualenv" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_requirements" +item = "specification::RequirementsSpecification::is_empty" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_resolver" +item = "error::NoSolutionError::packages" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_resolver" +item = "exclude_newer::ExcludeNewerPackage::into_inner" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_resolver" +item = "exclude_newer::ExcludeNewer::global" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_resolver" +item = "exclude_newer::ExcludeNewer::new" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_resolver" +item = "exclusions::Exclusions::contains" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_resolver" +item = "flat_index::FlatDistributions::remove" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_resolver" +item = "lock::Lock::is_empty" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_resolver" +item = "manifest::Manifest::apply" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_resolver" +item = "resolution::output::ResolverOutput::is_empty" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_resolver" +item = "universal_marker::ConflictMarker::implies" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_resolver" +item = "universal_marker::ConflictMarker::is_false" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_scripts" +item = "Pep723Item::path" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_settings" +item = "FilesystemOptions::with_origin" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "PACKSE_VERSION" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "DEFAULT_PYTHON_VERSION" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "LATEST_PYTHON_3_15" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "LATEST_PYTHON_3_14" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "LATEST_PYTHON_3_13" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "LATEST_PYTHON_3_12" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "LATEST_PYTHON_3_11" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "LATEST_PYTHON_3_10" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "build_vendor_links_url" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "packse_index_url" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "INSTA_FILTERS" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::new_with_bin" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_exclude_newer" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_http_timeout" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_concurrent_installs" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_counts" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_cache_size" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_missing_file_error" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_exe_suffix" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_python_sources" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_python_names" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_virtualenv_bin" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_python_install_bin" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_pyvenv_cfg_filters" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_python_symlinks" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_path" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_link_mode_warning" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_not_executable" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_python_keys" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_latest_python_versions" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_windows_temp_dir" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_compiled_file_count" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_current_version" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_cyclonedx_filters" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_collapsed_whitespace" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_python_download_cache" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_empty_python_install_mirror" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_managed_python_dirs" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_versions_as_managed" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filter" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_unset_git_credential_helper" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::clear_filters" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_cache_on_cow_fs" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_cache_on_alt_fs" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_cache_on_lowlinks_fs" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_cache_on_nocow_fs" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_working_dir_on_cow_fs" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_working_dir_on_nocow_fs" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::test_bucket_dir" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::new_with_versions_and_bin" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::command" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::disallow_git_cli" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_git_lfs_config" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::add_shared_options" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::add_shared_args" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::add_shared_env" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_compile" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_sync" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_show" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_freeze" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_check" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_list" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::venv" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_install" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_uninstall" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_tree" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_debug" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::help" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::init" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::sync" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::lock" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::audit" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::workspace_metadata" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::workspace_dir" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::workspace_list" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::export" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::format" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::build" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::version" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::self_version" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::self_update" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::publish" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_find" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_list" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_install" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_uninstall" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_upgrade" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_pin" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_dir" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::run" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::tool_run" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::tool_upgrade" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::tool_install" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::tool_list" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::tool_dir" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::tool_uninstall" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::add" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::remove" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::tree" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::clean" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::prune" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::cache_size" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::build_backend" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::interpreter" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_command" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::auth_login" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::auth_logout" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::auth_helper" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::auth_token" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_real_home" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::assert_command" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::assert_file" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::assert_installed" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::assert_not_installed" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::path_patterns" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_path" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::filters" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::filters_without_standard_filters" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_kind" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::site_packages" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::reset_venv" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::copy_ecosystem_project" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::diff_lock" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::read" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "diff_snapshot" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "site_packages_path" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "venv_bin_path" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "get_python" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "create_venv_from_executable" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "python_path_with_versions" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "python_installations_for_versions" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "apply_filters" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "run_and_format" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "run_and_format_with_status" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "copy_dir_ignore" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "make_project" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "READ_ONLY_GITHUB_TOKEN" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "READ_ONLY_GITHUB_TOKEN_2" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "READ_ONLY_GITHUB_SSH_DEPLOY_KEY" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "decode_token" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "download_to_disk" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "ReadOnlyDirectoryGuard::new" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_tool" +item = "InstalledTools::temp" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_trampoline_builder" +item = "Launcher::write_to_file" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_trampoline_builder" +item = "Launcher::with_python_path" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_types" +item = "traits::BuildStack::empty" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_workspace" +item = "pyproject::PyProjectToml::is_dynamic" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_workspace" +item = "pyproject::Sources::is_empty" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_workspace" +item = "pyproject::Sources::len" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_workspace" +item = "pyproject_mut::ArrayEdit::index" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_workspace" +item = "workspace::ProjectWorkspace::discover" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_distribution_types" +item = "config_settings::ConfigSettings::is_empty" +level = "expect" +reason = "kept public alongside the public len method" + From 7668d081b6859bd7ba9213a856103d32ab9b909a Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 26 May 2026 15:48:41 +0200 Subject: [PATCH 02/11] Get passing --- crates/uv-cache/src/lib.rs | 19 - crates/uv-cli/src/options.rs | 8 - crates/uv-client/src/base_client.rs | 19 - crates/uv-client/src/registry_client.rs | 7 - crates/uv-client/src/rkyvutil.rs | 27 - .../uv-configuration/src/dependency_groups.rs | 23 - crates/uv-configuration/src/excludes.rs | 5 - crates/uv-configuration/src/extras.rs | 29 - .../uv-configuration/src/package_options.rs | 13 - crates/uv-dispatch/src/lib.rs | 10 - crates/uv-distribution-types/src/buildable.rs | 5 - .../src/config_settings.rs | 10 - .../uv-distribution-types/src/dist_error.rs | 5 - crates/uv-distribution-types/src/index.rs | 18 - crates/uv-distribution-types/src/installed.rs | 21 - .../src/known_platform.rs | 9 - crates/uv-distribution-types/src/lib.rs | 26 - .../uv-distribution-types/src/requirement.rs | 36 - .../uv-distribution-types/src/resolution.rs | 10 - .../src/specified_requirement.rs | 39 - crates/uv-distribution/src/download.rs | 10 - .../src/metadata/requires_dist.rs | 19 - crates/uv-fs/src/lib.rs | 50 - crates/uv-pep440/src/version.rs | 8 - crates/uv-pep440/src/version_specifier.rs | 5 - crates/uv-pep508/src/lib.rs | 7 - crates/uv-pep508/src/marker/tree.rs | 9 +- crates/uv-pep508/src/unnamed.rs | 5 - crates/uv-pep508/src/verbatim_url.rs | 5 - crates/uv-platform/src/arch.rs | 4 - crates/uv-pypi-types/src/conflicts.rs | 37 +- .../src/supported_environments.rs | 5 - crates/uv-python/src/downloads.rs | 46 - crates/uv-python/src/installation.rs | 18 - crates/uv-python/src/interpreter.rs | 12 - crates/uv-python/src/managed.rs | 32 +- crates/uv-python/src/version_files.rs | 13 - crates/uv-python/src/virtualenv.rs | 12 - crates/uv-requirements/src/specification.rs | 5 - crates/uv-resolver/src/error.rs | 10 - crates/uv-resolver/src/exclude_newer.rs | 10 - crates/uv-resolver/src/exclusions.rs | 4 - crates/uv-resolver/src/flat_index.rs | 5 - crates/uv-resolver/src/manifest.rs | 11 - crates/uv-resolver/src/resolution/output.rs | 31 +- crates/uv-resolver/src/universal_marker.rs | 17 - crates/uv-scripts/src/lib.rs | 9 - crates/uv-settings/src/lib.rs | 6 - crates/uv-tool/src/lib.rs | 7 - crates/uv-types/src/traits.rs | 5 - crates/uv-workspace/src/pyproject.rs | 17 - crates/uv-workspace/src/pyproject_mut.rs | 8 - hawk.toml | 967 ++++-------------- 53 files changed, 206 insertions(+), 1542 deletions(-) diff --git a/crates/uv-cache/src/lib.rs b/crates/uv-cache/src/lib.rs index d672d5f3d82aa..9726e8a6a0d64 100644 --- a/crates/uv-cache/src/lib.rs +++ b/crates/uv-cache/src/lib.rs @@ -272,11 +272,6 @@ impl Cache { &self.root } - /// Return the [`Refresh`] policy for the cache. - pub fn refresh(&self) -> &Refresh { - &self.refresh - } - /// The folder for a specific cache bucket pub fn bucket(&self, cache_bucket: CacheBucket) -> PathBuf { self.root.join(cache_bucket.to_str()) @@ -1390,20 +1385,6 @@ impl Refresh { } } - /// Return the [`Timestamp`] associated with the refresh policy. - pub fn timestamp(&self) -> Timestamp { - match self { - Self::None(timestamp) => *timestamp, - Self::Packages(.., timestamp) => *timestamp, - Self::All(timestamp) => *timestamp, - } - } - - /// Returns `true` if no packages should be reinstalled. - pub fn is_none(&self) -> bool { - matches!(self, Self::None(_)) - } - /// Combine two [`Refresh`] policies, taking the "max" of the two policies. #[must_use] pub fn combine(self, other: Self) -> Self { diff --git a/crates/uv-cli/src/options.rs b/crates/uv-cli/src/options.rs index 527ab29562a2c..f51c359347aab 100644 --- a/crates/uv-cli/src/options.rs +++ b/crates/uv-cli/src/options.rs @@ -107,14 +107,6 @@ impl Flag { Self::Enabled { source, .. } => Some(source), } } - - /// Returns the CLI flag name, if the flag is enabled. - pub fn name(self) -> Option<&'static str> { - match self { - Self::Disabled => None, - Self::Enabled { name, .. } => Some(name), - } - } } impl From for bool { diff --git a/crates/uv-client/src/base_client.rs b/crates/uv-client/src/base_client.rs index 2ee35906d7205..068bc2c583304 100644 --- a/crates/uv-client/src/base_client.rs +++ b/crates/uv-client/src/base_client.rs @@ -725,11 +725,6 @@ impl BaseClient { self.read_timeout } - /// The configured client connect timeout. - pub fn connect_timeout(&self) -> Duration { - self.connect_timeout - } - /// The configured connectivity mode. pub fn connectivity(&self) -> Connectivity { self.connectivity @@ -1038,20 +1033,6 @@ impl<'a> RequestBuilder<'a> { self } - /// Add a set of Headers to the existing ones on this Request. - /// - /// The headers will be merged in to any already set. - pub fn headers(mut self, headers: HeaderMap) -> Self { - self.builder = self.builder.headers(headers); - self - } - - #[cfg(not(target_arch = "wasm32"))] - pub fn version(mut self, version: reqwest::Version) -> Self { - self.builder = self.builder.version(version); - self - } - #[cfg_attr(docsrs, doc(cfg(feature = "multipart")))] pub fn multipart(mut self, multipart: multipart::Form) -> Self { self.builder = self.builder.multipart(multipart); diff --git a/crates/uv-client/src/registry_client.rs b/crates/uv-client/src/registry_client.rs index ea47f66f7ed22..72f76332665dd 100644 --- a/crates/uv-client/src/registry_client.rs +++ b/crates/uv-client/src/registry_client.rs @@ -1441,13 +1441,6 @@ impl SimpleDetailMetadata { self.versions.iter() } - /// Return the project-level [PEP 792] status marker for this package. - /// - /// [PEP 792]: https://peps.python.org/pep-0792/ - pub fn project_status(&self) -> &ProjectStatus { - &self.project_status - } - fn from_pypi_files( files: Vec, package_name: &PackageName, diff --git a/crates/uv-client/src/rkyvutil.rs b/crates/uv-client/src/rkyvutil.rs index 33d832333935f..af64b4f438113 100644 --- a/crates/uv-client/src/rkyvutil.rs +++ b/crates/uv-client/src/rkyvutil.rs @@ -89,20 +89,6 @@ where }) } - /// Like `OwnedArchive::new`, but reads the value from the given reader. - /// - /// Note that this consumes the entirety of the given reader. - /// - /// # Errors - /// - /// If the bytes fail validation (e.g., contains unaligned pointers or - /// strings aren't valid UTF-8), then this returns an error. - pub fn from_reader(mut rdr: R) -> Result { - let mut buf = AlignedVec::with_capacity(1024); - buf.extend_from_reader(&mut rdr).map_err(ErrorKind::Io)?; - Self::new(buf) - } - /// Creates an owned archive value from the unarchived value. /// /// # Errors @@ -119,19 +105,6 @@ where }) } - /// Write the underlying bytes of this archived value to the given writer. - /// - /// Note that because this type has a `Deref` impl, this method requires - /// fully-qualified syntax. So, if `o` is an `OwnedValue`, then use - /// `OwnedValue::write(&o, wtr)`. - /// - /// # Errors - /// - /// Any failures from writing are returned to the caller. - pub fn write(this: &Self, mut wtr: W) -> Result<(), Error> { - Ok(wtr.write_all(&this.raw).map_err(ErrorKind::Io)?) - } - /// Returns the raw underlying bytes of this owned archive value. /// /// They are guaranteed to be a valid serialization of `Archived`. diff --git a/crates/uv-configuration/src/dependency_groups.rs b/crates/uv-configuration/src/dependency_groups.rs index c61ee96c88a63..3bba9ffebde3b 100644 --- a/crates/uv-configuration/src/dependency_groups.rs +++ b/crates/uv-configuration/src/dependency_groups.rs @@ -215,11 +215,6 @@ impl DependencyGroupsInner { group.iter().chain(no_group).chain(only_group) } - /// Returns `true` if the specification will have no effect. - pub fn is_empty(&self) -> bool { - self.prod() && self.exclude.is_empty() && self.include.is_empty() - } - /// Get the raw history for diagnostics pub fn history(&self) -> &DependencyGroupsHistory { &self.history @@ -361,24 +356,6 @@ impl IncludeGroups { Self::All => true, } } - - /// Returns `true` if the specification will have no effect. - pub fn is_empty(&self) -> bool { - match self { - Self::Some(groups) => groups.is_empty(), - // Although technically this is a noop if they have no groups, - // conceptually they're *trying* to have an effect, so treat it as one. - Self::All => false, - } - } - - /// Iterate over all groups referenced in the [`IncludeGroups`]. - pub fn names(&self) -> std::slice::Iter<'_, GroupName> { - match self { - Self::Some(groups) => groups.iter(), - Self::All => [].iter(), - } - } } impl Default for IncludeGroups { diff --git a/crates/uv-configuration/src/excludes.rs b/crates/uv-configuration/src/excludes.rs index 2c09a8740372d..dfd4363547afb 100644 --- a/crates/uv-configuration/src/excludes.rs +++ b/crates/uv-configuration/src/excludes.rs @@ -7,11 +7,6 @@ use uv_normalize::PackageName; pub struct Excludes(FxHashSet); impl Excludes { - /// Return an iterator over all package names in the exclusion set. - pub fn iter(&self) -> impl Iterator { - self.0.iter() - } - /// Check if a package is excluded. pub fn contains(&self, name: &PackageName) -> bool { self.0.contains(name) diff --git a/crates/uv-configuration/src/extras.rs b/crates/uv-configuration/src/extras.rs index 0225a78537489..cdecf27007666 100644 --- a/crates/uv-configuration/src/extras.rs +++ b/crates/uv-configuration/src/extras.rs @@ -118,7 +118,6 @@ impl ExtrasSpecification { ExtrasSpecificationWithDefaults { cur: Self::from_history(history), - prev: self.clone(), } } } @@ -245,32 +244,12 @@ impl ExtrasSpecificationHistory { } /// A trivial newtype wrapped around [`ExtrasSpecification`][] that signifies "defaults applied" -/// -/// It includes a copy of the previous semantics to provide info on if -/// the group being a default actually affected it being enabled, because it's obviously "correct". -/// (These are Arcs so it's ~free to hold onto the previous semantics) #[derive(Debug, Clone)] pub struct ExtrasSpecificationWithDefaults { /// The active semantics cur: ExtrasSpecification, - /// The semantics before defaults were applied - prev: ExtrasSpecification, } -impl ExtrasSpecificationWithDefaults { - /// Do not enable any extras - /// - /// Many places in the code need to know what extras are active, - /// but various commands or subsystems never enable any extras, - /// in which case they want this. - pub fn none() -> Self { - ExtrasSpecification::default().with_defaults(DefaultExtras::default()) - } - /// Returns `true` if the specification was enabled, and *only* because it was a default - pub fn contains_because_default(&self, extra: &ExtraName) -> bool { - self.cur.contains(extra) && !self.prev.contains(extra) - } -} impl std::ops::Deref for ExtrasSpecificationWithDefaults { type Target = ExtrasSpecification; fn deref(&self) -> &Self::Target { @@ -304,14 +283,6 @@ impl IncludeExtras { Self::All => false, } } - - /// Iterate over all extras referenced in the [`IncludeExtras`]. - pub fn names(&self) -> std::slice::Iter<'_, ExtraName> { - match self { - Self::Some(extras) => extras.iter(), - Self::All => [].iter(), - } - } } impl Default for IncludeExtras { diff --git a/crates/uv-configuration/src/package_options.rs b/crates/uv-configuration/src/package_options.rs index ee57fe2c9458d..617a7acee9657 100644 --- a/crates/uv-configuration/src/package_options.rs +++ b/crates/uv-configuration/src/package_options.rs @@ -38,11 +38,6 @@ impl Reinstall { matches!(self, Self::None) } - /// Returns `true` if all packages should be reinstalled. - pub fn is_all(&self) -> bool { - matches!(self, Self::All) - } - /// Returns `true` if the specified package should be reinstalled. pub fn contains_package(&self, package_name: &PackageName) -> bool { match self { @@ -164,14 +159,6 @@ impl Upgrade { } } - /// Create a new [`Upgrade`] to consider all packages. - pub fn all() -> Self { - Self { - strategy: UpgradeStrategy::All, - constraints: FxHashMap::default(), - } - } - /// Determine the upgrade selection strategy from the command-line arguments. pub fn from_args( upgrade: Option, diff --git a/crates/uv-dispatch/src/lib.rs b/crates/uv-dispatch/src/lib.rs index 5ee6dafa4dfa8..8882be80256ff 100644 --- a/crates/uv-dispatch/src/lib.rs +++ b/crates/uv-dispatch/src/lib.rs @@ -689,14 +689,4 @@ impl SharedState { pub fn in_flight(&self) -> &InFlight { &self.in_flight } - - /// Return the [`IndexCapabilities`] used by the [`SharedState`]. - pub fn capabilities(&self) -> &IndexCapabilities { - &self.capabilities - } - - /// Return the [`BuildArena`] used by the [`SharedState`]. - pub fn build_arena(&self) -> &BuildArena { - &self.build_arena - } } diff --git a/crates/uv-distribution-types/src/buildable.rs b/crates/uv-distribution-types/src/buildable.rs index 1edfc81deadcd..789527977fbdc 100644 --- a/crates/uv-distribution-types/src/buildable.rs +++ b/crates/uv-distribution-types/src/buildable.rs @@ -135,11 +135,6 @@ impl SourceUrl<'_> { }) ) } - - /// Return true if the source refers to a local file or directory. - pub fn is_local(&self) -> bool { - matches!(self, Self::Path(_) | Self::Directory(_)) - } } impl std::fmt::Display for SourceUrl<'_> { diff --git a/crates/uv-distribution-types/src/config_settings.rs b/crates/uv-distribution-types/src/config_settings.rs index 54be96840097d..fac651fc9b8d5 100644 --- a/crates/uv-distribution-types/src/config_settings.rs +++ b/crates/uv-distribution-types/src/config_settings.rs @@ -136,11 +136,6 @@ impl FromIterator for ConfigSettings { } impl ConfigSettings { - /// Returns the number of settings in the configuration. - pub fn len(&self) -> usize { - self.0.len() - } - /// Returns `true` if the configuration contains no settings. pub fn is_empty(&self) -> bool { self.0.is_empty() @@ -270,11 +265,6 @@ impl PackageConfigSettings { self.0.get(package) } - /// Returns `true` if there are no package-specific settings. - pub fn is_empty(&self) -> bool { - self.0.is_empty() - } - /// Merge two sets of package config settings, with the values in `self` taking precedence. #[must_use] pub fn merge(mut self, other: Self) -> Self { diff --git a/crates/uv-distribution-types/src/dist_error.rs b/crates/uv-distribution-types/src/dist_error.rs index 6ede85fcf30e5..8687ee5488494 100644 --- a/crates/uv-distribution-types/src/dist_error.rs +++ b/crates/uv-distribution-types/src/dist_error.rs @@ -142,11 +142,6 @@ impl DerivationChain { None } - /// Returns the length of the derivation chain. - pub fn len(&self) -> usize { - self.0.len() - } - /// Returns `true` if the derivation chain is empty. pub fn is_empty(&self) -> bool { self.0.is_empty() diff --git a/crates/uv-distribution-types/src/index.rs b/crates/uv-distribution-types/src/index.rs index d3e1e86308801..e2031c0dd9048 100644 --- a/crates/uv-distribution-types/src/index.rs +++ b/crates/uv-distribution-types/src/index.rs @@ -434,11 +434,6 @@ impl Index { &self.url } - /// Consume the [`Index`] and return the [`IndexUrl`]. - pub fn into_url(self) -> IndexUrl { - self.url - } - /// Return the raw [`Url`] of the index. pub fn raw_url(&self) -> &DisplaySafeUrl { self.url.url() @@ -589,12 +584,6 @@ pub struct IndexMetadata { } impl IndexMetadata { - /// Return a reference to the [`IndexMetadata`]. - pub fn as_ref(&self) -> IndexMetadataRef<'_> { - let Self { url, format: kind } = self; - IndexMetadataRef { url, format: *kind } - } - /// Consume the [`IndexMetadata`] and return the [`IndexUrl`]. pub fn into_url(self) -> IndexUrl { self.url @@ -617,13 +606,6 @@ impl IndexMetadata { } } -impl IndexMetadataRef<'_> { - /// Return the [`IndexUrl`] of the index. - pub fn url(&self) -> &IndexUrl { - self.url - } -} - impl<'a> From<&'a Index> for IndexMetadataRef<'a> { fn from(value: &'a Index) -> Self { Self { diff --git a/crates/uv-distribution-types/src/installed.rs b/crates/uv-distribution-types/src/installed.rs index 781514fc1f510..af14baa000767 100644 --- a/crates/uv-distribution-types/src/installed.rs +++ b/crates/uv-distribution-types/src/installed.rs @@ -368,17 +368,6 @@ impl InstalledDist { } } - /// Return the [`CacheInfo`] of the distribution, if any. - pub fn cache_info(&self) -> Option<&CacheInfo> { - match &self.kind { - InstalledDistKind::Registry(dist) => dist.cache_info.as_ref(), - InstalledDistKind::Url(dist) => dist.cache_info.as_ref(), - InstalledDistKind::EggInfoDirectory(..) => None, - InstalledDistKind::EggInfoFile(..) => None, - InstalledDistKind::LegacyEditable(..) => None, - } - } - /// Return the [`BuildInfo`] of the distribution, if any. pub fn build_info(&self) -> Option<&BuildInfo> { match &self.kind { @@ -474,16 +463,6 @@ impl InstalledDist { Ok(self.metadata_cache.get().expect("metadata should be set")) } - /// Return the `INSTALLER` of the distribution. - pub fn read_installer(&self) -> Result, InstalledDistError> { - let path = self.install_path().join("INSTALLER"); - match fs::read_to_string(path) { - Ok(installer) => Ok(Some(installer.trim().to_owned())), - Err(err) if err.kind() == std::io::ErrorKind::NotFound => Ok(None), - Err(err) => Err(err.into()), - } - } - /// Return the supported wheel tags for the distribution from the `WHEEL` file, if available. pub fn read_tags(&self) -> Result, InstalledDistError> { if let Some(tags) = self.tags_cache.get() { diff --git a/crates/uv-distribution-types/src/known_platform.rs b/crates/uv-distribution-types/src/known_platform.rs index 75e27a25b7ecd..585bb25f2e4b8 100644 --- a/crates/uv-distribution-types/src/known_platform.rs +++ b/crates/uv-distribution-types/src/known_platform.rs @@ -11,15 +11,6 @@ pub enum KnownPlatform { } impl KnownPlatform { - /// Return the platform's `sys.platform` value. - pub fn sys_platform(self) -> &'static str { - match self { - Self::Linux => "linux", - Self::Windows => "win32", - Self::MacOS => "darwin", - } - } - /// Return a [`MarkerTree`] for the platform. pub(crate) fn marker(self) -> MarkerTree { MarkerTree::expression(MarkerExpression::String { diff --git a/crates/uv-distribution-types/src/lib.rs b/crates/uv-distribution-types/src/lib.rs index 8a1ee551a72e6..6c63269658483 100644 --- a/crates/uv-distribution-types/src/lib.rs +++ b/crates/uv-distribution-types/src/lib.rs @@ -127,16 +127,6 @@ pub enum VersionOrUrlRef<'a, T: Pep508Url = VerbatimUrl> { Url(&'a T), } -impl<'a, T: Pep508Url> VersionOrUrlRef<'a, T> { - /// If it is a URL, return its value. - pub fn url(&self) -> Option<&'a T> { - match self { - Self::Version(_) => None, - Self::Url(url) => Some(url), - } - } -} - impl Verbatim for VersionOrUrlRef<'_> { fn verbatim(&self) -> Cow<'_, str> { match self { @@ -165,14 +155,6 @@ pub enum InstalledVersion<'a> { } impl<'a> InstalledVersion<'a> { - /// If it is a URL, return its value. - pub fn url(&self) -> Option<&'a DisplaySafeUrl> { - match self { - Self::Version(_) => None, - Self::Url(url, _) => Some(url), - } - } - /// If it is a version, return its value. pub fn version(&self) -> &'a Version { match self { @@ -663,14 +645,6 @@ impl Dist { Self::Source(source_dist) => source_dist.version(), } } - - /// Convert this distribution into a reference. - pub fn as_ref(&self) -> DistRef<'_> { - match self { - Self::Built(dist) => DistRef::Built(dist), - Self::Source(dist) => DistRef::Source(dist), - } - } } impl<'a> From<&'a Dist> for DistRef<'a> { diff --git a/crates/uv-distribution-types/src/requirement.rs b/crates/uv-distribution-types/src/requirement.rs index ff9d486429271..2229a97fc35f7 100644 --- a/crates/uv-distribution-types/src/requirement.rs +++ b/crates/uv-distribution-types/src/requirement.rs @@ -73,11 +73,6 @@ impl Requirement { self.marker.evaluate_optional_environment(env, extras) } - /// Returns `true` if the requirement is editable. - pub fn is_editable(&self) -> bool { - self.source.is_editable() - } - /// Convert to a [`Requirement`] with a relative path based on the given root. pub fn relative_to(self, path: &Path) -> Result { Ok(Self { @@ -711,37 +706,6 @@ impl RequirementSource { } } - /// Convert the source to a version specifier or URL. - /// - /// If the source is a registry and the specifier is empty, it returns `None`. - pub fn version_or_url(&self) -> Option> { - match self { - Self::Registry { specifier, .. } => { - if specifier.is_empty() { - None - } else { - Some(VersionOrUrl::VersionSpecifier(specifier.clone())) - } - } - Self::Url { .. } - | Self::GitPath { .. } - | Self::GitDirectory { .. } - | Self::Path { .. } - | Self::Directory { .. } => Some(VersionOrUrl::Url(self.to_verbatim_parsed_url()?)), - } - } - - /// Returns `true` if the source is editable. - pub fn is_editable(&self) -> bool { - matches!( - self, - Self::Directory { - editable: Some(true), - .. - } - ) - } - /// Returns `true` if the source is empty. pub fn is_empty(&self) -> bool { match self { diff --git a/crates/uv-distribution-types/src/resolution.rs b/crates/uv-distribution-types/src/resolution.rs index 611165e449694..8605f8225dc98 100644 --- a/crates/uv-distribution-types/src/resolution.rs +++ b/crates/uv-distribution-types/src/resolution.rs @@ -191,16 +191,6 @@ pub enum Node { }, } -impl Node { - /// Returns `true` if the node should be installed. - pub fn install(&self) -> bool { - match self { - Self::Root => false, - Self::Dist { install, .. } => *install, - } - } -} - /// An edge in the resolution graph. #[derive(Debug, Clone)] pub enum Edge { diff --git a/crates/uv-distribution-types/src/specified_requirement.rs b/crates/uv-distribution-types/src/specified_requirement.rs index a5d2887a459e7..f09a2f1069410 100644 --- a/crates/uv-distribution-types/src/specified_requirement.rs +++ b/crates/uv-distribution-types/src/specified_requirement.rs @@ -1,4 +1,3 @@ -use std::borrow::Cow; use std::fmt::{Display, Formatter}; use uv_git_types::{GitLfs, GitReference}; @@ -185,33 +184,6 @@ impl UnresolvedRequirement { } } - /// Returns the extras for the requirement. - pub fn extras(&self) -> &[ExtraName] { - match self { - Self::Named(requirement) => &requirement.extras, - Self::Unnamed(requirement) => &requirement.extras, - } - } - - /// Return the version specifier or URL for the requirement. - pub fn source(&self) -> Cow<'_, RequirementSource> { - match self { - Self::Named(requirement) => Cow::Borrowed(&requirement.source), - Self::Unnamed(requirement) => Cow::Owned(RequirementSource::from_parsed_url( - requirement.url.parsed_url.clone(), - requirement.url.verbatim.clone(), - )), - } - } - - /// Returns `true` if the requirement is editable. - pub fn is_editable(&self) -> bool { - match self { - Self::Named(requirement) => requirement.is_editable(), - Self::Unnamed(requirement) => requirement.url.is_editable(), - } - } - /// Return the hashes of the requirement, as specified in the URL fragment. pub fn hashes(&self) -> Option { match self { @@ -224,17 +196,6 @@ impl UnresolvedRequirement { } } -impl NameRequirementSpecification { - /// Return the hashes of the requirement, as specified in the URL fragment. - pub fn hashes(&self) -> Option { - let RequirementSource::Url { ref url, .. } = self.requirement.source else { - return None; - }; - let fragment = url.fragment()?; - Hashes::parse_fragment(fragment).ok() - } -} - impl From for UnresolvedRequirementSpecification { fn from(requirement: Requirement) -> Self { Self { diff --git a/crates/uv-distribution/src/download.rs b/crates/uv-distribution/src/download.rs index 465844a9be9a7..39120e9b34632 100644 --- a/crates/uv-distribution/src/download.rs +++ b/crates/uv-distribution/src/download.rs @@ -27,21 +27,11 @@ pub struct LocalWheel { } impl LocalWheel { - /// Return the path to the downloaded wheel's entry in the cache. - pub fn target(&self) -> &Path { - &self.archive - } - /// Return the [`Dist`] from which this wheel was downloaded. pub(crate) fn remote(&self) -> &Dist { &self.dist } - /// Return the [`WheelFilename`] of this wheel. - pub fn filename(&self) -> &WheelFilename { - &self.filename - } - /// Read the [`ResolutionMetadata`] from a wheel. pub(crate) fn metadata(&self) -> Result { read_flat_wheel_metadata(&self.filename, &self.archive) diff --git a/crates/uv-distribution/src/metadata/requires_dist.rs b/crates/uv-distribution/src/metadata/requires_dist.rs index a0d85cf08cba0..52ad681ffd205 100644 --- a/crates/uv-distribution/src/metadata/requires_dist.rs +++ b/crates/uv-distribution/src/metadata/requires_dist.rs @@ -26,20 +26,6 @@ pub struct RequiresDist { } impl RequiresDist { - /// Lower without considering `tool.uv` in `pyproject.toml`, used for index and other archive - /// dependencies. - pub fn from_metadata23(metadata: uv_pypi_types::RequiresDist) -> Self { - Self { - name: metadata.name, - requires_dist: Box::into_iter(metadata.requires_dist) - .map(Requirement::from) - .collect(), - provides_extra: metadata.provides_extra, - dependency_groups: BTreeMap::default(), - dynamic: metadata.dynamic, - } - } - /// Lower by considering `tool.uv` in `pyproject.toml` if present, used for Git and directory /// dependencies. pub(crate) async fn from_project_maybe_workspace( @@ -446,11 +432,6 @@ impl FlatRequiresDist { Self(flattened.into_boxed_slice()) } - - /// Consume the [`FlatRequiresDist`] and return the inner requirements. - pub fn into_inner(self) -> Box<[Requirement]> { - self.0 - } } impl IntoIterator for FlatRequiresDist { diff --git a/crates/uv-fs/src/lib.rs b/crates/uv-fs/src/lib.rs index 33b7280949a08..99a52480c6c8b 100644 --- a/crates/uv-fs/src/lib.rs +++ b/crates/uv-fs/src/lib.rs @@ -447,56 +447,6 @@ pub async fn rename_with_retry( } // TODO(zanieb): Look into reusing this code? -/// Wrap an arbitrary operation on two files, e.g., copying, with retries on transient operating -/// system errors. -#[cfg_attr(not(windows), allow(unused_variables))] -pub fn with_retry_sync( - from: impl AsRef, - to: impl AsRef, - operation_name: &str, - operation: impl Fn() -> Result<(), std::io::Error>, -) -> Result<(), std::io::Error> { - #[cfg(windows)] - { - use backon::BlockingRetryable; - // On Windows, antivirus software can lock files temporarily, making them inaccessible. - // This is most common for DLLs, and the common suggestion is to retry the operation with - // some backoff. - // - // See: & - let from = from.as_ref(); - let to = to.as_ref(); - - operation - .retry(backoff_file_move()) - .sleep(std::thread::sleep) - .when(|err| err.kind() == std::io::ErrorKind::PermissionDenied) - .notify(|err, _dur| { - warn!( - "Retrying {} from {} to {} due to transient error: {}", - operation_name, - from.display(), - to.display(), - err - ); - }) - .call() - .map_err(|err| { - std::io::Error::other(format!( - "Failed {} {} to {}: {}", - operation_name, - from.display(), - to.display(), - err - )) - }) - } - #[cfg(not(windows))] - { - operation() - } -} - /// Why a file persist failed #[cfg(windows)] enum PersistRetryError { diff --git a/crates/uv-pep440/src/version.rs b/crates/uv-pep440/src/version.rs index 8dbf039739385..5f727236d2bdb 100644 --- a/crates/uv-pep440/src/version.rs +++ b/crates/uv-pep440/src/version.rs @@ -1765,14 +1765,6 @@ impl LocalVersion { Self::Max => LocalVersionSlice::Max, } } - - /// Clear the local version segments, if they exist. - pub fn clear(&mut self) { - match self { - Self::Segments(segments) => segments.clear(), - Self::Max => *self = Self::Segments(Vec::new()), - } - } } /// Output the local version identifier string. diff --git a/crates/uv-pep440/src/version_specifier.rs b/crates/uv-pep440/src/version_specifier.rs index 0c4a093fe2c3b..4af746410df2a 100644 --- a/crates/uv-pep440/src/version_specifier.rs +++ b/crates/uv-pep440/src/version_specifier.rs @@ -543,11 +543,6 @@ impl VersionSpecifier { &self.version } - /// Get the operator and version parts of this specifier. - pub fn into_parts(self) -> (Operator, Version) { - (self.operator, self.version) - } - /// Whether the version marker includes a prerelease. pub fn any_prerelease(&self) -> bool { self.version.any_prerelease() diff --git a/crates/uv-pep508/src/lib.rs b/crates/uv-pep508/src/lib.rs index 931c11d8856c9..911a33add6047 100644 --- a/crates/uv-pep508/src/lib.rs +++ b/crates/uv-pep508/src/lib.rs @@ -403,13 +403,6 @@ impl Requirement { #[derive(Debug, Clone, Eq, Hash, PartialEq)] pub struct Extras(Vec); -impl Extras { - /// Parse a list of extras. - pub fn parse(input: &str) -> Result> { - Ok(Self(parse_extras_cursor(&mut Cursor::new(input))?)) - } -} - /// The actual version specifier or URL to install. #[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum VersionOrUrl { diff --git a/crates/uv-pep508/src/marker/tree.rs b/crates/uv-pep508/src/marker/tree.rs index 7ea11087262ca..116acd4b42bc0 100644 --- a/crates/uv-pep508/src/marker/tree.rs +++ b/crates/uv-pep508/src/marker/tree.rs @@ -20,8 +20,8 @@ use crate::marker::lowering::{ }; use crate::marker::parse; use crate::{ - CanonicalMarkerValueExtra, MarkerEnvironment, Pep508Error, Pep508ErrorSource, Pep508Url, - Reporter, TracingReporter, + CanonicalMarkerValueExtra, MarkerEnvironment, Pep508Error, Pep508ErrorSource, Reporter, + TracingReporter, }; /// Ways in which marker evaluation can fail @@ -805,11 +805,6 @@ impl FromStr for MarkerTree { } impl MarkerTree { - /// Like [`FromStr::from_str`], but the caller chooses the return type generic. - pub fn parse_str(markers: &str) -> Result> { - parse::parse_markers(markers, &mut TracingReporter) - } - /// An empty marker that always evaluates to `true`. pub const TRUE: Self = Self(NodeId::TRUE); diff --git a/crates/uv-pep508/src/unnamed.rs b/crates/uv-pep508/src/unnamed.rs index 48a929a4468b9..7e638d894a3cd 100644 --- a/crates/uv-pep508/src/unnamed.rs +++ b/crates/uv-pep508/src/unnamed.rs @@ -82,11 +82,6 @@ pub struct UnnamedRequirement { } impl UnnamedRequirement { - /// Returns whether the markers apply for the given environment - pub fn evaluate_markers(&self, env: &MarkerEnvironment, extras: &[ExtraName]) -> bool { - self.evaluate_optional_environment(Some(env), extras) - } - /// Returns whether the markers apply for the given environment pub fn evaluate_optional_environment( &self, diff --git a/crates/uv-pep508/src/verbatim_url.rs b/crates/uv-pep508/src/verbatim_url.rs index cfea470d1d6b3..b228f1d6e5f42 100644 --- a/crates/uv-pep508/src/verbatim_url.rs +++ b/crates/uv-pep508/src/verbatim_url.rs @@ -276,11 +276,6 @@ impl VerbatimUrl { self.url.clone() } - /// Convert a [`VerbatimUrl`] into a [`DisplaySafeUrl`]. - pub fn into_url(self) -> DisplaySafeUrl { - self.url - } - /// Return the underlying [`Path`], if the URL is a file URL. #[cfg(feature = "non-pep508-extensions")] pub fn as_path(&self) -> Result { diff --git a/crates/uv-platform/src/arch.rs b/crates/uv-platform/src/arch.rs index 65ba857b3148a..3a802c39f90d9 100644 --- a/crates/uv-platform/src/arch.rs +++ b/crates/uv-platform/src/arch.rs @@ -91,10 +91,6 @@ impl Arch { self.family } - pub fn is_arm(&self) -> bool { - matches!(self.family, target_lexicon::Architecture::Arm(_)) - } - pub(crate) fn is_wasm(self) -> bool { matches!(self.family, target_lexicon::Architecture::Wasm32) } diff --git a/crates/uv-pypi-types/src/conflicts.rs b/crates/uv-pypi-types/src/conflicts.rs index 26242ad47df9f..05ca5e0dd8e52 100644 --- a/crates/uv-pypi-types/src/conflicts.rs +++ b/crates/uv-pypi-types/src/conflicts.rs @@ -224,13 +224,6 @@ pub struct ConflictSet { } impl ConflictSet { - /// Create a pair of items that conflict with one another. - pub fn pair(item1: ConflictItem, item2: ConflictItem) -> Self { - Self { - set: BTreeSet::from_iter(vec![item1, item2]), - } - } - /// Returns an iterator over all conflicting items. pub fn iter(&self) -> impl Iterator + Clone + '_ { self.set.iter() @@ -384,16 +377,6 @@ impl<'a> ConflictItemRef<'a> { self.kind } - /// Returns the extra name of this conflicting item. - pub fn extra(&self) -> Option<&'a ExtraName> { - self.kind.extra() - } - - /// Returns the group name of this conflicting item. - pub fn group(&self) -> Option<&'a GroupName> { - self.kind.group() - } - /// Converts this borrowed conflicting item to its owned variant. pub fn to_owned(&self) -> ConflictItem { ConflictItem { @@ -480,25 +463,7 @@ pub enum ConflictKindRef<'a> { Project, } -impl<'a> ConflictKindRef<'a> { - /// If this conflict corresponds to an extra, then return the - /// extra name. - pub fn extra(&self) -> Option<&'a ExtraName> { - match self { - Self::Extra(extra) => Some(extra), - Self::Group(_) | Self::Project => None, - } - } - - /// If this conflict corresponds to a group, then return the - /// group name. - pub fn group(&self) -> Option<&'a GroupName> { - match self { - Self::Group(group) => Some(group), - Self::Extra(_) | Self::Project => None, - } - } - +impl ConflictKindRef<'_> { /// Converts this borrowed conflict to its owned variant. pub(crate) fn to_owned(self) -> ConflictKind { match self { diff --git a/crates/uv-pypi-types/src/supported_environments.rs b/crates/uv-pypi-types/src/supported_environments.rs index 8a1299dac027f..6ff8bde14143f 100644 --- a/crates/uv-pypi-types/src/supported_environments.rs +++ b/crates/uv-pypi-types/src/supported_environments.rs @@ -33,11 +33,6 @@ impl SupportedEnvironments { pub fn is_empty(&self) -> bool { self.0.is_empty() } - - /// Returns the number of supported environments. - pub fn len(&self) -> usize { - self.0.len() - } } impl<'a> IntoIterator for &'a SupportedEnvironments { diff --git a/crates/uv-python/src/downloads.rs b/crates/uv-python/src/downloads.rs index 23a1b09d170f5..6e46e3abbf15b 100644 --- a/crates/uv-python/src/downloads.rs +++ b/crates/uv-python/src/downloads.rs @@ -455,10 +455,6 @@ impl PythonDownloadRequest { self.arch.as_ref() } - pub fn os(&self) -> Option<&Os> { - self.os.as_ref() - } - pub fn libc(&self) -> Option<&Libc> { self.libc.as_ref() } @@ -1164,34 +1160,6 @@ impl ManagedPythonDownload { .await } - /// Download and extract a Python distribution. - #[instrument(skip(client, installation_dir, scratch_dir, reporter), fields(download = % self.key()))] - pub async fn fetch( - &self, - client: &BaseClient, - installation_dir: &Path, - scratch_dir: &Path, - reinstall: bool, - python_install_mirror: Option<&str>, - pypy_install_mirror: Option<&str>, - reporter: Option<&dyn Reporter>, - ) -> Result { - let urls = self.download_urls(python_install_mirror, pypy_install_mirror)?; - let url = urls - .into_iter() - .next() - .ok_or(Error::NoPythonDownloadUrlFound)?; - self.fetch_from_url( - url, - client, - installation_dir, - scratch_dir, - reinstall, - reporter, - ) - .await - } - /// Download and extract a Python distribution from the given URL. async fn fetch_from_url( &self, @@ -1479,20 +1447,6 @@ impl ManagedPythonDownload { self.key.version() } - /// Return the primary [`Url`] to use when downloading the distribution. - /// - /// This is the first URL from [`Self::download_urls`]. For CPython without a user-configured - /// mirror, this is the default Astral mirror URL. Use [`Self::download_urls`] to get all - /// URLs including fallbacks. - pub fn download_url( - &self, - python_install_mirror: Option<&str>, - pypy_install_mirror: Option<&str>, - ) -> Result { - self.download_urls(python_install_mirror, pypy_install_mirror) - .map(|mut urls| urls.remove(0)) - } - /// Return the ordered list of [`Url`]s to try when downloading the distribution. /// /// For CPython without a user-configured mirror, the default Astral mirror is listed first, diff --git a/crates/uv-python/src/installation.rs b/crates/uv-python/src/installation.rs index 2ae1b389fc610..0b951968dc8d5 100644 --- a/crates/uv-python/src/installation.rs +++ b/crates/uv-python/src/installation.rs @@ -337,14 +337,6 @@ impl PythonInstallation { }) } - /// Create a [`PythonInstallation`] from an existing [`Interpreter`]. - pub fn from_interpreter(interpreter: Interpreter) -> Self { - Self { - source: PythonSource::ProvidedPath, - interpreter, - } - } - /// Return the [`PythonSource`] of the Python installation, indicating where it was found. pub fn source(&self) -> &PythonSource { &self.source @@ -381,16 +373,6 @@ impl PythonInstallation { ) || self.os().is_emscripten() } - /// Return the [`Arch`] of the Python installation as reported by its interpreter. - pub fn arch(&self) -> Arch { - self.interpreter.arch() - } - - /// Return the [`Libc`] of the Python installation as reported by its interpreter. - pub fn libc(&self) -> Libc { - self.interpreter.libc() - } - /// Return the [`Os`] of the Python installation as reported by its interpreter. pub(crate) fn os(&self) -> Os { self.interpreter.os() diff --git a/crates/uv-python/src/interpreter.rs b/crates/uv-python/src/interpreter.rs index f179d9667b4b0..c92f745e486c7 100644 --- a/crates/uv-python/src/interpreter.rs +++ b/crates/uv-python/src/interpreter.rs @@ -636,18 +636,6 @@ impl Interpreter { .chain(interpreter.into_iter().flatten().map(Cow::Borrowed)) } - /// Check if the interpreter matches the given Python version. - /// - /// If a patch version is present, we will require an exact match. - /// Otherwise, just the major and minor version numbers need to match. - pub fn satisfies(&self, version: &PythonVersion) -> bool { - if version.patch().is_some() { - version.version() == self.python_version() - } else { - (version.major(), version.minor()) == self.python_tuple() - } - } - /// Whether or not this Python interpreter is from a default Python executable name, like /// `python`, `python3`, or `python.exe`. pub(crate) fn has_default_executable_name(&self) -> bool { diff --git a/crates/uv-python/src/managed.rs b/crates/uv-python/src/managed.rs index 2377810a81321..d0886328a7f5b 100644 --- a/crates/uv-python/src/managed.rs +++ b/crates/uv-python/src/managed.rs @@ -33,9 +33,7 @@ use crate::implementation::{ use crate::installation::{self, PythonInstallationKey}; use crate::interpreter::Interpreter; use crate::python_version::PythonVersion; -use crate::{ - PythonInstallationMinorVersionKey, PythonRequest, PythonVariant, macos_dylib, sysconfig, -}; +use crate::{PythonInstallationMinorVersionKey, PythonVariant, macos_dylib, sysconfig}; #[derive(Error, Debug)] pub enum Error { @@ -498,26 +496,6 @@ impl ManagedPythonInstallation { PythonInstallationMinorVersionKey::ref_cast(&self.key) } - pub fn satisfies(&self, request: &PythonRequest) -> bool { - match request { - PythonRequest::File(path) => self.executable(false) == *path, - PythonRequest::Default | PythonRequest::Any => true, - PythonRequest::Directory(path) => self.path() == *path, - PythonRequest::ExecutableName(name) => self - .executable(false) - .file_name() - .is_some_and(|filename| filename.to_string_lossy() == *name), - PythonRequest::Implementation(implementation) => { - *implementation == self.implementation() - } - PythonRequest::ImplementationVersion(implementation, version) => { - *implementation == self.implementation() && version.matches_version(&self.version()) - } - PythonRequest::Version(version) => version.matches_version(&self.version()), - PythonRequest::Key(request) => request.satisfied_by_key(self.key()), - } - } - /// Ensure the environment contains the canonical Python executable names. pub fn ensure_canonical_executables(&self) -> Result<(), Error> { let python = self.executable(false); @@ -712,14 +690,6 @@ impl ManagedPythonInstallation { } true } - - pub fn url(&self) -> Option<&str> { - self.url.as_deref() - } - - pub fn sha256(&self) -> Option<&str> { - self.sha256.as_deref() - } } /// A representation of a minor version symlink directory (or junction on Windows) diff --git a/crates/uv-python/src/version_files.rs b/crates/uv-python/src/version_files.rs index aca1413fdbc8d..fba2f0499c542 100644 --- a/crates/uv-python/src/version_files.rs +++ b/crates/uv-python/src/version_files.rs @@ -193,19 +193,6 @@ impl PythonVersionFile { } } - /// Read a Python version file at the given path. - /// - /// If the file does not exist, an error is returned. - pub async fn from_path(path: PathBuf) -> Result { - let Some(result) = Self::try_from_path(path).await? else { - return Err(std::io::Error::new( - std::io::ErrorKind::NotFound, - "Version file not found".to_string(), - )); - }; - Ok(result) - } - /// Create a new representation of a version file at the given path. /// /// The file will not any include versions; see [`PythonVersionFile::with_versions`]. diff --git a/crates/uv-python/src/virtualenv.rs b/crates/uv-python/src/virtualenv.rs index 2bc323b479eeb..c957cb689fbca 100644 --- a/crates/uv-python/src/virtualenv.rs +++ b/crates/uv-python/src/virtualenv.rs @@ -36,8 +36,6 @@ pub struct VirtualEnvironment { pub struct PyVenvConfiguration { /// The `PYTHONHOME` directory containing the base Python executable. pub(crate) home: Option, - /// Was the virtual environment created with the `virtualenv` package? - pub(crate) virtualenv: bool, /// Was the virtual environment created with the `uv` package? pub(crate) uv: bool, /// Is the virtual environment relocatable? @@ -234,7 +232,6 @@ impl PyVenvConfiguration { /// Parse a `pyvenv.cfg` file into a [`PyVenvConfiguration`]. pub fn parse(cfg: impl AsRef) -> Result { let mut home = None; - let mut virtualenv = false; let mut uv = false; let mut relocatable = false; let mut seed = false; @@ -254,9 +251,6 @@ impl PyVenvConfiguration { "home" => { home = Some(PathBuf::from(value.trim())); } - "virtualenv" => { - virtualenv = true; - } "uv" => { uv = true; } @@ -281,7 +275,6 @@ impl PyVenvConfiguration { Ok(Self { home, - virtualenv, uv, relocatable, seed, @@ -290,11 +283,6 @@ impl PyVenvConfiguration { }) } - /// Returns true if the virtual environment was created with the `virtualenv` package. - pub fn is_virtualenv(&self) -> bool { - self.virtualenv - } - /// Returns true if the virtual environment was created with the uv package. pub fn is_uv(&self) -> bool { self.uv diff --git a/crates/uv-requirements/src/specification.rs b/crates/uv-requirements/src/specification.rs index 460a33d7faab4..cc00c09fb7ee8 100644 --- a/crates/uv-requirements/src/specification.rs +++ b/crates/uv-requirements/src/specification.rs @@ -704,11 +704,6 @@ impl RequirementsSpecification { ..Self::default() } } - - /// Return true if the specification does not include any requirements to install. - pub fn is_empty(&self) -> bool { - self.requirements.is_empty() && self.source_trees.is_empty() && self.overrides.is_empty() - } } #[derive(Debug, Default, Clone)] diff --git a/crates/uv-resolver/src/error.rs b/crates/uv-resolver/src/error.rs index 65f16069d116e..5c51759adabe6 100644 --- a/crates/uv-resolver/src/error.rs +++ b/crates/uv-resolver/src/error.rs @@ -3,7 +3,6 @@ use std::fmt::Formatter; use std::sync::{Arc, OnceLock}; use indexmap::IndexSet; -use itertools::Itertools; use owo_colors::OwoColorize; use pubgrub::{ DefaultStringReporter, DerivationTree, Derived, External, Range, Ranges, Reporter, Term, @@ -397,15 +396,6 @@ impl NoSolutionError { NoSolutionHeader::new(self.env.clone()) } - /// Get the packages that are involved in this error. - pub fn packages(&self) -> impl Iterator { - self.error - .packages() - .into_iter() - .filter_map(|p| p.name()) - .unique() - } - /// Generate the report and hints for this resolution failure. /// /// Returns the formatted report string and structured [`PubGrubHint`] values. diff --git a/crates/uv-resolver/src/exclude_newer.rs b/crates/uv-resolver/src/exclude_newer.rs index 8c8f9536ded0b..335a5f614a5b6 100644 --- a/crates/uv-resolver/src/exclude_newer.rs +++ b/crates/uv-resolver/src/exclude_newer.rs @@ -338,11 +338,6 @@ impl<'a> IntoIterator for &'a ExcludeNewerPackage { } impl ExcludeNewerPackage { - /// Convert to the inner `HashMap`. - pub fn into_inner(self) -> FxHashMap { - self.0 - } - /// Returns true if this map is empty (no package-specific settings). pub fn is_empty(&self) -> bool { self.0.is_empty() @@ -436,11 +431,6 @@ impl ExcludeNewer { } } - /// Create a new exclude newer configuration. - pub fn new(global: Option, package: ExcludeNewerPackage) -> Self { - Self { global, package } - } - /// Create from CLI arguments. pub fn from_args( global: Option, diff --git a/crates/uv-resolver/src/exclusions.rs b/crates/uv-resolver/src/exclusions.rs index 511a16cbf2a68..5130e5a48e02a 100644 --- a/crates/uv-resolver/src/exclusions.rs +++ b/crates/uv-resolver/src/exclusions.rs @@ -22,8 +22,4 @@ impl Exclusions { pub(crate) fn upgrade(&self, package: &PackageName) -> bool { self.upgrade.contains(package) } - - pub fn contains(&self, package: &PackageName) -> bool { - self.reinstall(package) || self.upgrade(package) - } } diff --git a/crates/uv-resolver/src/flat_index.rs b/crates/uv-resolver/src/flat_index.rs index b2623b96c3c00..2115487db3a7a 100644 --- a/crates/uv-resolver/src/flat_index.rs +++ b/crates/uv-resolver/src/flat_index.rs @@ -89,11 +89,6 @@ impl FlatDistributions { self.0.iter() } - /// Removes the [`PrioritizedDist`] for the given version. - pub fn remove(&mut self, version: &Version) -> Option { - self.0.remove(version) - } - /// Add the given [`File`] to the [`FlatDistributions`] for the given package. fn add_file( &mut self, diff --git a/crates/uv-resolver/src/manifest.rs b/crates/uv-resolver/src/manifest.rs index 0b46250035ce0..bd2022ef0c7ed 100644 --- a/crates/uv-resolver/src/manifest.rs +++ b/crates/uv-resolver/src/manifest.rs @@ -249,17 +249,6 @@ impl Manifest { } } - /// Apply the overrides and constraints to a set of requirements. - /// - /// Constraints are always applied _on top_ of overrides, such that constraints are applied - /// even if a requirement is overridden. - pub fn apply<'a>( - &'a self, - requirements: impl IntoIterator, - ) -> impl Iterator> { - self.constraints.apply(self.overrides.apply(requirements)) - } - /// Returns the number of input requirements. pub fn num_requirements(&self) -> usize { self.requirements.len() diff --git a/crates/uv-resolver/src/resolution/output.rs b/crates/uv-resolver/src/resolution/output.rs index b68a9899b3799..f0f0b8b3982d6 100644 --- a/crates/uv-resolver/src/resolution/output.rs +++ b/crates/uv-resolver/src/resolution/output.rs @@ -604,7 +604,7 @@ impl ResolverOutput { /// Return `true` if there are no packages in the graph. pub fn is_empty(&self) -> bool { - self.dists().any(AnnotatedDist::is_base) + !self.dists().any(AnnotatedDist::is_base) } /// Returns `true` if the graph contains the given package. @@ -995,3 +995,32 @@ fn has_lower_bound( } false } + +#[cfg(test)] +mod tests { + use super::ResolverOutput; + use petgraph::graph::Graph; + use uv_configuration::{Constraints, Overrides}; + use uv_distribution_types::RequiresPython; + use uv_pep440::Version; + + use crate::Options; + + #[test] + fn empty_output_is_empty() { + let output = ResolverOutput { + graph: Graph::default(), + requires_python: RequiresPython::greater_than_equal_version( + &"3.12".parse::().unwrap(), + ), + fork_markers: Vec::new(), + diagnostics: Vec::new(), + requirements: Vec::new(), + constraints: Constraints::default(), + overrides: Overrides::default(), + options: Options::default(), + }; + + assert!(output.is_empty()); + } +} diff --git a/crates/uv-resolver/src/universal_marker.rs b/crates/uv-resolver/src/universal_marker.rs index bc3178071a6d9..326fbce62eaaf 100644 --- a/crates/uv-resolver/src/universal_marker.rs +++ b/crates/uv-resolver/src/universal_marker.rs @@ -490,28 +490,11 @@ impl ConflictMarker { Self { marker } } - /// Returns a new conflict marker corresponding to the logical implication - /// of `self` and the given consequent. - /// - /// If the conflict marker returned is always `true`, then it can be said - /// that `self` implies `consequent`. - #[must_use] - pub fn implies(self, other: Self) -> Self { - let mut marker = self.marker; - marker.implies(other.marker); - Self { marker } - } - /// Returns true if this conflict marker will always evaluate to `true`. pub(crate) fn is_true(self) -> bool { self.marker.is_true() } - /// Returns true if this conflict marker will always evaluate to `false`. - pub fn is_false(self) -> bool { - self.marker.is_false() - } - /// Returns inclusion and exclusion (respectively) conflict items parsed /// from this conflict marker. /// diff --git a/crates/uv-scripts/src/lib.rs b/crates/uv-scripts/src/lib.rs index fa502effa93a4..88ea6b2dce266 100644 --- a/crates/uv-scripts/src/lib.rs +++ b/crates/uv-scripts/src/lib.rs @@ -42,15 +42,6 @@ impl Pep723Item { } } - /// Return the path of the PEP 723 item, if any. - pub fn path(&self) -> Option<&Path> { - match self { - Self::Script(script) => Some(&script.path), - Self::Stdin(..) => None, - Self::Remote(..) => None, - } - } - /// Return the PEP 723 script, if any. pub fn as_script(&self) -> Option<&Pep723Script> { match self { diff --git a/crates/uv-settings/src/lib.rs b/crates/uv-settings/src/lib.rs index 4da914ed630b2..4e1d5432c06da 100644 --- a/crates/uv-settings/src/lib.rs +++ b/crates/uv-settings/src/lib.rs @@ -31,12 +31,6 @@ impl FilesystemOptions { pub fn into_options(self) -> Options { self.0 } - - /// Set the [`Origin`] on all indexes without an existing origin. - #[must_use] - pub fn with_origin(self, origin: Origin) -> Self { - Self(self.0.with_origin(origin)) - } } impl Deref for FilesystemOptions { diff --git a/crates/uv-tool/src/lib.rs b/crates/uv-tool/src/lib.rs index 12bad72a6ee46..cc667aea7c1e8 100644 --- a/crates/uv-tool/src/lib.rs +++ b/crates/uv-tool/src/lib.rs @@ -354,13 +354,6 @@ impl InstalledTools { Ok(venv) } - /// Create a temporary tools directory. - pub fn temp() -> Result { - Ok(Self::from_path( - StateStore::temp()?.bucket(StateBucket::Tools), - )) - } - /// Initialize the tools directory. /// /// Ensures the directory is created. diff --git a/crates/uv-types/src/traits.rs b/crates/uv-types/src/traits.rs index 39b0cb7542080..d27784146fa28 100644 --- a/crates/uv-types/src/traits.rs +++ b/crates/uv-types/src/traits.rs @@ -314,11 +314,6 @@ impl Deref for AnyErrorBuild { pub struct BuildStack(FxHashSet); impl BuildStack { - /// Return an empty stack. - pub fn empty() -> Self { - Self(FxHashSet::default()) - } - pub fn contains(&self, id: &DistributionId) -> bool { self.0.contains(id) } diff --git a/crates/uv-workspace/src/pyproject.rs b/crates/uv-workspace/src/pyproject.rs index 882d2d8a14502..4603be0ed83fc 100644 --- a/crates/uv-workspace/src/pyproject.rs +++ b/crates/uv-workspace/src/pyproject.rs @@ -170,13 +170,6 @@ impl PyProjectToml { .and_then(|uv| uv.package) } - /// Returns `true` if the project uses a dynamic version. - pub fn is_dynamic(&self) -> bool { - self.project - .as_ref() - .is_some_and(|project| project.version.is_none()) - } - /// Returns whether the project manifest contains any script table. pub fn has_scripts(&self) -> bool { if let Some(ref project) = self.project { @@ -1061,16 +1054,6 @@ impl Sources { pub fn iter(&self) -> impl Iterator { self.0.iter() } - - /// Returns `true` if the sources list is empty. - pub fn is_empty(&self) -> bool { - self.0.is_empty() - } - - /// Returns the number of sources in the list. - pub fn len(&self) -> usize { - self.0.len() - } } impl FromIterator for Sources { diff --git a/crates/uv-workspace/src/pyproject_mut.rs b/crates/uv-workspace/src/pyproject_mut.rs index 306a76f39120f..c2ccb346e3e7e 100644 --- a/crates/uv-workspace/src/pyproject_mut.rs +++ b/crates/uv-workspace/src/pyproject_mut.rs @@ -79,14 +79,6 @@ struct Comment { kind: CommentType, } -impl ArrayEdit { - pub fn index(&self) -> usize { - match self { - Self::Update(i) | Self::Add(i) => *i, - } - } -} - /// The default version specifier when adding a dependency. // While PEP 440 allows an arbitrary number of version digits, the `major` and `minor` build on // most projects sticking to two or three components and a SemVer-ish versioning system, so can diff --git a/hawk.toml b/hawk.toml index 31fc1671f360e..8e4b0d0025f30 100644 --- a/hawk.toml +++ b/hawk.toml @@ -8,13 +8,6 @@ item = "cache::CredentialsCache::new" level = "expect" reason = "used by workspace tests or sibling products outside the selected binary graph" -[[override]] -lint = "hawk::dead_public" -crate = "uv_auth" -item = "middleware::AuthMiddleware::with_cache" -level = "expect" -reason = "retained library API outside the selected binary graph" - [[override]] lint = "hawk::unnecessary_public" crate = "uv_cache" @@ -22,69 +15,6 @@ item = "Cache::temp" level = "expect" reason = "used by workspace tests or sibling products outside the selected binary graph" -[[override]] -lint = "hawk::dead_public" -crate = "uv_cache" -item = "Cache::refresh" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_cache" -item = "Refresh::timestamp" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_cache" -item = "Refresh::is_none" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_cli" -item = "options::Flag::name" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::BaseClientBuilder::<'a>::no_retry_delay" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::BaseClientBuilder::<'a>::with_system_certs" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::BaseClientBuilder::<'a>::extra_middleware" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::BaseClientBuilder::<'a>::proxy" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::BaseClient::connect_timeout" -level = "expect" -reason = "retained library API outside the selected binary graph" - [[override]] lint = "hawk::unnecessary_public" crate = "uv_client" @@ -92,27 +22,6 @@ item = "base_client::BaseClient::retry_policy" level = "expect" reason = "used by workspace tests or sibling products outside the selected binary graph" -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::RequestBuilder::<'a>::headers" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::RequestBuilder::<'a>::version" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::RequestBuilder::<'a>::raw_builder" -level = "expect" -reason = "retained library API outside the selected binary graph" - [[override]] lint = "hawk::unnecessary_public" crate = "uv_client" @@ -120,125 +29,6 @@ item = "error::WrappedReqwestError::with_problem_details" level = "expect" reason = "used by workspace tests or sibling products outside the selected binary graph" -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "registry_client::RegistryClientBuilder::<'a>::with_reqwest_client" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "registry_client::RegistryClientBuilder::<'a>::extra_middleware" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "registry_client::RegistryClientBuilder::<'a>::proxy" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "registry_client::RegistryClient::fetch_simple_index" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "registry_client::SimpleIndexMetadata::iter" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "registry_client::SimpleDetailMetadata::project_status" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "rkyvutil::OwnedArchive::::from_reader" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "rkyvutil::OwnedArchive::::write" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_configuration" -item = "dependency_groups::DependencyGroupsInner::is_empty" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_configuration" -item = "dependency_groups::IncludeGroups::is_empty" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_configuration" -item = "dependency_groups::IncludeGroups::names" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_configuration" -item = "excludes::Excludes::iter" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_configuration" -item = "extras::ExtrasSpecificationWithDefaults::none" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_configuration" -item = "extras::ExtrasSpecificationWithDefaults::contains_because_default" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_configuration" -item = "extras::IncludeExtras::names" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_configuration" -item = "package_options::Reinstall::is_all" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_configuration" -item = "package_options::Upgrade::all" -level = "expect" -reason = "retained library API outside the selected binary graph" - [[override]] lint = "hawk::dead_public" crate = "uv_dispatch" @@ -246,48 +36,6 @@ item = "BuildDispatch::<'a>::with_build_extra_env_vars" level = "expect" reason = "retained library API outside the selected binary graph" -[[override]] -lint = "hawk::dead_public" -crate = "uv_dispatch" -item = "SharedState::capabilities" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_dispatch" -item = "SharedState::build_arena" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "buildable::SourceUrl::<'_>::is_local" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "config_settings::ConfigSettings::len" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "config_settings::PackageConfigSettings::is_empty" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "dist_error::DerivationChain::len" -level = "expect" -reason = "retained library API outside the selected binary graph" - [[override]] lint = "hawk::unnecessary_public" crate = "uv_distribution_types" @@ -295,27 +43,6 @@ item = "file::FileLocation::new" level = "expect" reason = "used by workspace tests or sibling products outside the selected binary graph" -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "index::Index::into_url" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "index::IndexMetadata::as_ref" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "index::IndexMetadataRef::<'_>::url" -level = "expect" -reason = "retained library API outside the selected binary graph" - [[override]] lint = "hawk::unnecessary_public" crate = "uv_distribution_types" @@ -324,368 +51,25 @@ level = "expect" reason = "used by workspace tests or sibling products outside the selected binary graph" [[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "index_url::IndexLocations::simple_api_cache_control_for" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "installed::InstalledDist::cache_info" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" +lint = "hawk::unnecessary_public" crate = "uv_distribution_types" -item = "installed::InstalledDist::read_installer" +item = "requires_python::RequiresPythonRange::upper" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by workspace tests or sibling products outside the selected binary graph" [[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "known_platform::KnownPlatform::sys_platform" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "VersionOrUrlRef::<'a, T>::url" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "InstalledVersion::<'a>::url" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "Dist::as_ref" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "requirement::Requirement::is_editable" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "requirement::RequirementSource::version_or_url" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "requirement::RequirementSource::is_editable" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_distribution_types" -item = "requires_python::RequiresPythonRange::upper" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "resolution::Resolution::is_empty" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "resolution::Node::install" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "specified_requirement::UnresolvedRequirement::extras" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "specified_requirement::UnresolvedRequirement::source" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "specified_requirement::UnresolvedRequirement::is_editable" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "specified_requirement::NameRequirementSpecification::hashes" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution" -item = "download::LocalWheel::target" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution" -item = "download::LocalWheel::filename" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution" -item = "metadata::requires_dist::RequiresDist::from_metadata23" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution" -item = "metadata::requires_dist::FlatRequiresDist::into_inner" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_fastid" -item = "Id::secure" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_fs" -item = "with_retry_sync" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_fs" -item = "copy_dir_all" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_installer" -item = "installer::Installer::<'a>::with_installer_name" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "credential::nop_credential_builder" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "set_default_credential_builder" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::new_with_target" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::new_with_credential" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::set_secret" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::get_secret" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::get_attributes" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::update_attributes" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::get_credential" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "macos::MacCredential::get_credential" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "mock::MockCredential::set_error" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "mock::default_credential_builder" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_netrc" -item = "::from_file" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_netrc" -item = "netrc::Authenticator::new" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_options_metadata" -item = "OptionSet::record" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_options_metadata" -item = "OptionSet::documentation" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep440" -item = "version::VersionPattern::verbatim" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep440" -item = "version::VersionPattern::wildcard" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep440" -item = "version::LocalVersion::clear" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep440" -item = "version_specifier::VersionSpecifier::into_parts" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep508" -item = "Extras::parse" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep508" -item = "marker::tree::MarkerExpression::from_str" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep508" -item = "marker::tree::MarkerTree::parse_str" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep508" -item = "marker::tree::MarkerTree::simplify_not_extras" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep508" -item = "unnamed::UnnamedRequirement::::evaluate_markers" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep508" -item = "verbatim_url::VerbatimUrl::into_url" +lint = "hawk::unnecessary_public" +crate = "uv_netrc" +item = "::from_file" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by workspace tests or sibling products outside the selected binary graph" [[override]] -lint = "hawk::dead_public" -crate = "uv_platform" -item = "arch::Arch::is_arm" +lint = "hawk::unnecessary_public" +crate = "uv_options_metadata" +item = "OptionSet::record" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by workspace tests or sibling products outside the selected binary graph" [[override]] lint = "hawk::unnecessary_public" @@ -717,262 +101,318 @@ reason = "used by workspace tests or sibling products outside the selected binar [[override]] lint = "hawk::dead_public" -crate = "uv_pypi_types" -item = "conflicts::ConflictSet::pair" +crate = "uv_keyring" +item = "Entry::set_secret" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by the uv-keyring integration tests" [[override]] lint = "hawk::dead_public" -crate = "uv_pypi_types" -item = "conflicts::ConflictItemRef::<'a>::extra" +crate = "uv_keyring" +item = "Entry::get_secret" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by the uv-keyring integration tests" [[override]] lint = "hawk::dead_public" -crate = "uv_pypi_types" -item = "conflicts::ConflictItemRef::<'a>::group" +crate = "uv_keyring" +item = "credential::nop_credential_builder" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by the fallback credential path on unsupported targets" [[override]] lint = "hawk::dead_public" -crate = "uv_pypi_types" -item = "conflicts::ConflictKindRef::<'a>::extra" +crate = "uv_netrc" +item = "netrc::Authenticator::new" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-netrc unit tests" [[override]] lint = "hawk::dead_public" -crate = "uv_pypi_types" -item = "conflicts::ConflictKindRef::<'a>::group" +crate = "uv_trampoline_builder" +item = "Launcher::write_to_file" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by the Windows uv command outside the selected host graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_trampoline_builder" +item = "Launcher::with_python_path" +level = "expect" +reason = "used by the Windows uv command outside the selected host graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "resolution::Resolution::is_empty" +level = "expect" +reason = "required companion to public Resolution::len" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_resolver" +item = "lock::Lock::is_empty" +level = "expect" +reason = "required companion to public Lock::len" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_resolver" +item = "resolution::output::ResolverOutput::is_empty" +level = "expect" +reason = "required companion to public ResolverOutput::len" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pep440" +item = "version::VersionPattern::verbatim" +level = "expect" +reason = "used by uv-pep508 unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pep440" +item = "version::VersionPattern::wildcard" +level = "expect" +reason = "used by uv-pep508 unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_fs" +item = "copy_dir_all" +level = "expect" +reason = "used by uv and uv-build-backend integration tests" [[override]] lint = "hawk::dead_public" crate = "uv_pypi_types" item = "dependency_groups::DependencyGroups::get" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-workspace unit tests" [[override]] lint = "hawk::dead_public" crate = "uv_pypi_types" item = "dependency_groups::DependencyGroups::iter" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "required companion to IntoIterator for &DependencyGroups" [[override]] lint = "hawk::dead_public" -crate = "uv_pypi_types" -item = "supported_environments::SupportedEnvironments::len" +crate = "uv_client" +item = "base_client::BaseClientBuilder::<'a>::extra_middleware" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "supported public middleware extension API" [[override]] lint = "hawk::dead_public" -crate = "uv_python" -item = "downloads::PythonDownloadRequest::os" +crate = "uv_client" +item = "registry_client::RegistryClientBuilder::<'a>::extra_middleware" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "supported public middleware extension API" [[override]] lint = "hawk::dead_public" -crate = "uv_python" -item = "downloads::ManagedPythonDownload::fetch" +crate = "uv_client" +item = "registry_client::RegistryClientBuilder::<'a>::with_reqwest_client" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "supported public custom HTTP client API" [[override]] lint = "hawk::dead_public" -crate = "uv_python" -item = "downloads::ManagedPythonDownload::python_version" +crate = "uv_client" +item = "base_client::BaseClientBuilder::<'a>::proxy" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "supported public proxy configuration API" [[override]] lint = "hawk::dead_public" -crate = "uv_python" -item = "downloads::ManagedPythonDownload::download_url" +crate = "uv_client" +item = "registry_client::RegistryClientBuilder::<'a>::proxy" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "supported public proxy configuration API" [[override]] lint = "hawk::dead_public" -crate = "uv_python" -item = "installation::PythonInstallation::from_interpreter" +crate = "uv_client" +item = "base_client::BaseClientBuilder::<'a>::no_retry_delay" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-client integration tests" [[override]] lint = "hawk::dead_public" -crate = "uv_python" -item = "installation::PythonInstallation::arch" +crate = "uv_client" +item = "base_client::RequestBuilder::<'a>::raw_builder" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-publish unit tests" [[override]] lint = "hawk::dead_public" -crate = "uv_python" -item = "installation::PythonInstallation::libc" +crate = "uv_client" +item = "base_client::BaseClientBuilder::<'a>::with_system_certs" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-client integration tests" [[override]] lint = "hawk::dead_public" -crate = "uv_python" -item = "interpreter::Interpreter::satisfies" +crate = "uv_workspace" +item = "workspace::ProjectWorkspace::discover" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-distribution unit tests" [[override]] lint = "hawk::dead_public" -crate = "uv_python" -item = "managed::ManagedPythonInstallations::temp" +crate = "uv_resolver" +item = "exclude_newer::ExcludeNewer::global" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-bench benchmarks" [[override]] lint = "hawk::dead_public" -crate = "uv_python" -item = "managed::ManagedPythonInstallation::satisfies" +crate = "uv_client" +item = "registry_client::RegistryClient::fetch_simple_index" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by the uv-dev package listing tool" [[override]] lint = "hawk::dead_public" -crate = "uv_python" -item = "managed::ManagedPythonInstallation::url" +crate = "uv_options_metadata" +item = "OptionSet::documentation" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-dev options reference generation" [[override]] lint = "hawk::dead_public" -crate = "uv_python" -item = "managed::ManagedPythonInstallation::sha256" +crate = "uv_client" +item = "registry_client::SimpleIndexMetadata::iter" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by the uv-dev package listing tool" [[override]] lint = "hawk::dead_public" crate = "uv_python" item = "managed::platform_key_from_env" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv integration tests" [[override]] lint = "hawk::dead_public" -crate = "uv_python" -item = "version_files::PythonVersionFile::from_path" +crate = "uv_auth" +item = "middleware::AuthMiddleware::with_cache" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-auth unit tests" [[override]] lint = "hawk::dead_public" -crate = "uv_python" -item = "virtualenv::PyVenvConfiguration::is_virtualenv" +crate = "uv_fastid" +item = "Id::secure" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-fastid unit tests" [[override]] lint = "hawk::dead_public" -crate = "uv_requirements" -item = "specification::RequirementsSpecification::is_empty" +crate = "uv_installer" +item = "installer::Installer::<'a>::with_installer_name" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-installer unit tests" [[override]] lint = "hawk::dead_public" -crate = "uv_resolver" -item = "error::NoSolutionError::packages" +crate = "uv_python" +item = "downloads::ManagedPythonDownload::python_version" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-python unit tests" [[override]] lint = "hawk::dead_public" -crate = "uv_resolver" -item = "exclude_newer::ExcludeNewerPackage::into_inner" +crate = "uv_python" +item = "managed::ManagedPythonInstallations::temp" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-python unit tests" [[override]] lint = "hawk::dead_public" -crate = "uv_resolver" -item = "exclude_newer::ExcludeNewer::global" +crate = "uv_distribution_types" +item = "index_url::IndexLocations::simple_api_cache_control_for" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-distribution-types unit tests" [[override]] lint = "hawk::dead_public" -crate = "uv_resolver" -item = "exclude_newer::ExcludeNewer::new" +crate = "uv_pep508" +item = "marker::tree::MarkerExpression::from_str" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-pep508 unit tests" [[override]] lint = "hawk::dead_public" -crate = "uv_resolver" -item = "exclusions::Exclusions::contains" +crate = "uv_pep508" +item = "marker::tree::MarkerTree::simplify_not_extras" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-pep508 unit tests" [[override]] lint = "hawk::dead_public" -crate = "uv_resolver" -item = "flat_index::FlatDistributions::remove" +crate = "uv_keyring" +item = "set_default_credential_builder" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "public mock credential API documented for tests" [[override]] lint = "hawk::dead_public" -crate = "uv_resolver" -item = "lock::Lock::is_empty" +crate = "uv_keyring" +item = "Entry::new_with_target" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-keyring platform unit tests" [[override]] lint = "hawk::dead_public" -crate = "uv_resolver" -item = "manifest::Manifest::apply" +crate = "uv_keyring" +item = "Entry::new_with_credential" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-keyring platform unit tests" [[override]] lint = "hawk::dead_public" -crate = "uv_resolver" -item = "resolution::output::ResolverOutput::is_empty" +crate = "uv_keyring" +item = "Entry::get_attributes" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-keyring platform unit tests" [[override]] lint = "hawk::dead_public" -crate = "uv_resolver" -item = "universal_marker::ConflictMarker::implies" +crate = "uv_keyring" +item = "Entry::update_attributes" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-keyring platform unit tests" [[override]] lint = "hawk::dead_public" -crate = "uv_resolver" -item = "universal_marker::ConflictMarker::is_false" +crate = "uv_keyring" +item = "Entry::get_credential" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-keyring platform unit tests" [[override]] lint = "hawk::dead_public" -crate = "uv_scripts" -item = "Pep723Item::path" +crate = "uv_keyring" +item = "macos::MacCredential::get_credential" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-keyring platform unit tests" [[override]] lint = "hawk::dead_public" -crate = "uv_settings" -item = "FilesystemOptions::with_origin" +crate = "uv_keyring" +item = "mock::MockCredential::set_error" level = "expect" -reason = "retained library API outside the selected binary graph" +reason = "used by uv-keyring mock unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "mock::default_credential_builder" +level = "expect" +reason = "public mock credential API documented for tests" [[override]] lint = "hawk::dead_public" @@ -1975,69 +1415,6 @@ item = "ReadOnlyDirectoryGuard::new" level = "expect" reason = "public API of the integration test support crate" -[[override]] -lint = "hawk::dead_public" -crate = "uv_tool" -item = "InstalledTools::temp" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_trampoline_builder" -item = "Launcher::write_to_file" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_trampoline_builder" -item = "Launcher::with_python_path" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_types" -item = "traits::BuildStack::empty" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_workspace" -item = "pyproject::PyProjectToml::is_dynamic" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_workspace" -item = "pyproject::Sources::is_empty" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_workspace" -item = "pyproject::Sources::len" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_workspace" -item = "pyproject_mut::ArrayEdit::index" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_workspace" -item = "workspace::ProjectWorkspace::discover" -level = "expect" -reason = "retained library API outside the selected binary graph" - [[override]] lint = "hawk::unnecessary_public" crate = "uv_distribution_types" From bcfa0ade19a16a70a721d58cb75b667f0026c895 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 26 May 2026 15:59:22 +0200 Subject: [PATCH 03/11] Fix Windows compilation after Hawk cleanup --- crates/uv-fs/src/lib.rs | 50 +++++++++++++++++++++ crates/uv-resolver/src/resolution/output.rs | 29 ------------ hawk.toml | 7 +++ 3 files changed, 57 insertions(+), 29 deletions(-) diff --git a/crates/uv-fs/src/lib.rs b/crates/uv-fs/src/lib.rs index 99a52480c6c8b..33b7280949a08 100644 --- a/crates/uv-fs/src/lib.rs +++ b/crates/uv-fs/src/lib.rs @@ -447,6 +447,56 @@ pub async fn rename_with_retry( } // TODO(zanieb): Look into reusing this code? +/// Wrap an arbitrary operation on two files, e.g., copying, with retries on transient operating +/// system errors. +#[cfg_attr(not(windows), allow(unused_variables))] +pub fn with_retry_sync( + from: impl AsRef, + to: impl AsRef, + operation_name: &str, + operation: impl Fn() -> Result<(), std::io::Error>, +) -> Result<(), std::io::Error> { + #[cfg(windows)] + { + use backon::BlockingRetryable; + // On Windows, antivirus software can lock files temporarily, making them inaccessible. + // This is most common for DLLs, and the common suggestion is to retry the operation with + // some backoff. + // + // See: & + let from = from.as_ref(); + let to = to.as_ref(); + + operation + .retry(backoff_file_move()) + .sleep(std::thread::sleep) + .when(|err| err.kind() == std::io::ErrorKind::PermissionDenied) + .notify(|err, _dur| { + warn!( + "Retrying {} from {} to {} due to transient error: {}", + operation_name, + from.display(), + to.display(), + err + ); + }) + .call() + .map_err(|err| { + std::io::Error::other(format!( + "Failed {} {} to {}: {}", + operation_name, + from.display(), + to.display(), + err + )) + }) + } + #[cfg(not(windows))] + { + operation() + } +} + /// Why a file persist failed #[cfg(windows)] enum PersistRetryError { diff --git a/crates/uv-resolver/src/resolution/output.rs b/crates/uv-resolver/src/resolution/output.rs index f0f0b8b3982d6..d0414d4708a12 100644 --- a/crates/uv-resolver/src/resolution/output.rs +++ b/crates/uv-resolver/src/resolution/output.rs @@ -995,32 +995,3 @@ fn has_lower_bound( } false } - -#[cfg(test)] -mod tests { - use super::ResolverOutput; - use petgraph::graph::Graph; - use uv_configuration::{Constraints, Overrides}; - use uv_distribution_types::RequiresPython; - use uv_pep440::Version; - - use crate::Options; - - #[test] - fn empty_output_is_empty() { - let output = ResolverOutput { - graph: Graph::default(), - requires_python: RequiresPython::greater_than_equal_version( - &"3.12".parse::().unwrap(), - ), - fork_markers: Vec::new(), - diagnostics: Vec::new(), - requirements: Vec::new(), - constraints: Constraints::default(), - overrides: Overrides::default(), - options: Options::default(), - }; - - assert!(output.is_empty()); - } -} diff --git a/hawk.toml b/hawk.toml index 8e4b0d0025f30..0acbaa6b06244 100644 --- a/hawk.toml +++ b/hawk.toml @@ -183,6 +183,13 @@ item = "copy_dir_all" level = "expect" reason = "used by uv and uv-build-backend integration tests" +[[override]] +lint = "hawk::dead_public" +crate = "uv_fs" +item = "with_retry_sync" +level = "expect" +reason = "used by uv-install-wheel on Windows outside the selected host graph" + [[override]] lint = "hawk::dead_public" crate = "uv_pypi_types" From a582310600e81942c1a9348bcaf5e7950df7f042 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 26 May 2026 16:06:40 +0200 Subject: [PATCH 04/11] Restore Windows managed Python accessors --- crates/uv-python/src/managed.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/uv-python/src/managed.rs b/crates/uv-python/src/managed.rs index d0886328a7f5b..ba3103dcf5490 100644 --- a/crates/uv-python/src/managed.rs +++ b/crates/uv-python/src/managed.rs @@ -690,6 +690,16 @@ impl ManagedPythonInstallation { } true } + + #[cfg(windows)] + pub(crate) fn url(&self) -> Option<&str> { + self.url.as_deref() + } + + #[cfg(windows)] + pub(crate) fn sha256(&self) -> Option<&str> { + self.sha256.as_deref() + } } /// A representation of a minor version symlink directory (or junction on Windows) From 6bc4992ce09bbf138bc491fb1c36b693679ffc52 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 26 May 2026 17:13:55 +0200 Subject: [PATCH 05/11] Use target-aware Hawk expectations --- crates/uv-keyring/src/windows.rs | 4 +- crates/uv-windows/src/job.rs | 9 ---- hawk.toml | 84 ++++++++++++++++++++++++++++++-- 3 files changed, 83 insertions(+), 14 deletions(-) diff --git a/crates/uv-keyring/src/windows.rs b/crates/uv-keyring/src/windows.rs index 4d2bbbf0e6f43..4599c22734182 100644 --- a/crates/uv-keyring/src/windows.rs +++ b/crates/uv-keyring/src/windows.rs @@ -345,7 +345,7 @@ impl WinCredential { /// If there isn't already one there, it will be created only /// when [`set_password`](WinCredential::set_password) is /// called. - pub fn new_with_target(target: Option<&str>, service: &str, user: &str) -> Result { + pub(crate) fn new_with_target(target: Option<&str>, service: &str, user: &str) -> Result { const VERSION: &str = env!("CARGO_PKG_VERSION"); let credential = if let Some(target) = target { Self { @@ -385,7 +385,7 @@ pub struct WinCredentialBuilder; /// /// On Windows, with the default feature set, /// this is called once when an entry is first created. -pub fn default_credential_builder() -> Box { +pub(crate) fn default_credential_builder() -> Box { Box::new(WinCredentialBuilder {}) } diff --git a/crates/uv-windows/src/job.rs b/crates/uv-windows/src/job.rs index 05ecbbb9dcc24..aa296b95bcb7e 100644 --- a/crates/uv-windows/src/job.rs +++ b/crates/uv-windows/src/job.rs @@ -104,15 +104,6 @@ impl Job { .map_err(|e| JobError::Assign(e.code().0)) } - /// Returns the raw job handle. - /// - /// The returned handle is owned by this `Job` and will be closed when the `Job` - /// is dropped. The caller must not close or otherwise invalidate this handle. - #[must_use] - pub const fn as_raw_handle(&self) -> HANDLE { - self.handle - } - /// Configures the job object limits. #[allow(unsafe_code)] fn configure_limits(&self) -> Result<(), JobError> { diff --git a/hawk.toml b/hawk.toml index 0acbaa6b06244..70fa673863418 100644 --- a/hawk.toml +++ b/hawk.toml @@ -132,14 +132,16 @@ lint = "hawk::dead_public" crate = "uv_trampoline_builder" item = "Launcher::write_to_file" level = "expect" -reason = "used by the Windows uv command outside the selected host graph" +target = "cfg(not(windows))" +reason = "used by the Windows uv command when analyzing a non-Windows target" [[override]] lint = "hawk::dead_public" crate = "uv_trampoline_builder" item = "Launcher::with_python_path" level = "expect" -reason = "used by the Windows uv command outside the selected host graph" +target = "cfg(not(windows))" +reason = "used by the Windows uv command when analyzing a non-Windows target" [[override]] lint = "hawk::dead_public" @@ -183,12 +185,21 @@ item = "copy_dir_all" level = "expect" reason = "used by uv and uv-build-backend integration tests" +[[override]] +lint = "hawk::dead_public" +crate = "uv_fs" +item = "copy_atomic_sync" +level = "expect" +target = "cfg(not(unix))" +reason = "used by uv-install-wheel only when analyzing a Unix target" + [[override]] lint = "hawk::dead_public" crate = "uv_fs" item = "with_retry_sync" level = "expect" -reason = "used by uv-install-wheel on Windows outside the selected host graph" +target = "cfg(unix)" +reason = "used by uv-install-wheel only when analyzing a non-Unix target" [[override]] lint = "hawk::dead_public" @@ -337,6 +348,22 @@ item = "managed::ManagedPythonInstallations::temp" level = "expect" reason = "used by uv-python unit tests" +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "interpreter::Interpreter::pointer_size" +level = "expect" +target = "cfg(not(unix))" +reason = "used by uv-virtualenv only when analyzing a Unix target" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "pointer_size::PointerSize::is_64" +level = "expect" +target = "cfg(not(unix))" +reason = "used by uv-virtualenv only when analyzing a Unix target" + [[override]] lint = "hawk::dead_public" crate = "uv_distribution_types" @@ -405,6 +432,15 @@ lint = "hawk::dead_public" crate = "uv_keyring" item = "macos::MacCredential::get_credential" level = "expect" +target = "cfg(target_os = \"macos\")" +reason = "used by uv-keyring platform unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "windows::WinCredential::get_credential" +level = "expect" +target = "cfg(windows)" reason = "used by uv-keyring platform unit tests" [[override]] @@ -421,6 +457,46 @@ item = "mock::default_credential_builder" level = "expect" reason = "public mock credential API documented for tests" +[[override]] +lint = "hawk::dead_public" +crate = "uv_windows" +item = "ctrl_handler::CtrlHandlerError::code" +level = "expect" +target = "cfg(windows)" +reason = "used by the uv-trampoline binary outside the selected uv graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_windows" +item = "job::JobError::code" +level = "expect" +target = "cfg(windows)" +reason = "used by the uv-trampoline binary outside the selected uv graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_windows" +item = "job::JobError::message" +level = "expect" +target = "cfg(windows)" +reason = "used by the uv-trampoline binary outside the selected uv graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_windows" +item = "job::Job::new" +level = "expect" +target = "cfg(windows)" +reason = "used by the uv-trampoline binary outside the selected uv graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_windows" +item = "job::Job::assign_process" +level = "expect" +target = "cfg(windows)" +reason = "used by the uv-trampoline binary outside the selected uv graph" + [[override]] lint = "hawk::dead_public" crate = "uv_test" @@ -1392,6 +1468,7 @@ lint = "hawk::dead_public" crate = "uv_test" item = "READ_ONLY_GITHUB_TOKEN_2" level = "expect" +target = "cfg(not(windows))" reason = "public API of the integration test support crate" [[override]] @@ -1420,6 +1497,7 @@ lint = "hawk::dead_public" crate = "uv_test" item = "ReadOnlyDirectoryGuard::new" level = "expect" +target = "cfg(unix)" reason = "public API of the integration test support crate" [[override]] From a9c09698af77b8f6999b7c8c7742dd2ea77f1392 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 26 May 2026 17:47:26 +0200 Subject: [PATCH 06/11] Remove TOML file --- hawk.toml | 1509 ----------------------------------------------------- 1 file changed, 1509 deletions(-) delete mode 100644 hawk.toml diff --git a/hawk.toml b/hawk.toml deleted file mode 100644 index 70fa673863418..0000000000000 --- a/hawk.toml +++ /dev/null @@ -1,1509 +0,0 @@ -# Hawk analyzes the `uv` binary as a closed world; retain public API outside that graph. -# Keep each retained finding expected so removing it requires deleting this entry. - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_auth" -item = "cache::CredentialsCache::new" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_cache" -item = "Cache::temp" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_client" -item = "base_client::BaseClient::retry_policy" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_client" -item = "error::WrappedReqwestError::with_problem_details" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_dispatch" -item = "BuildDispatch::<'a>::with_build_extra_env_vars" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_distribution_types" -item = "file::FileLocation::new" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_distribution_types" -item = "index_url::IndexUrl::parse" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_distribution_types" -item = "requires_python::RequiresPythonRange::upper" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_netrc" -item = "::from_file" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_options_metadata" -item = "OptionSet::record" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_platform" -item = "os::Os::from_env" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_preview" -item = "Preview::new" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_preview" -item = "Preview::all" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_pypi_types" -item = "conflicts::Conflicts::push" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::set_secret" -level = "expect" -reason = "used by the uv-keyring integration tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::get_secret" -level = "expect" -reason = "used by the uv-keyring integration tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "credential::nop_credential_builder" -level = "expect" -reason = "used by the fallback credential path on unsupported targets" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_netrc" -item = "netrc::Authenticator::new" -level = "expect" -reason = "used by uv-netrc unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_trampoline_builder" -item = "Launcher::write_to_file" -level = "expect" -target = "cfg(not(windows))" -reason = "used by the Windows uv command when analyzing a non-Windows target" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_trampoline_builder" -item = "Launcher::with_python_path" -level = "expect" -target = "cfg(not(windows))" -reason = "used by the Windows uv command when analyzing a non-Windows target" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "resolution::Resolution::is_empty" -level = "expect" -reason = "required companion to public Resolution::len" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_resolver" -item = "lock::Lock::is_empty" -level = "expect" -reason = "required companion to public Lock::len" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_resolver" -item = "resolution::output::ResolverOutput::is_empty" -level = "expect" -reason = "required companion to public ResolverOutput::len" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep440" -item = "version::VersionPattern::verbatim" -level = "expect" -reason = "used by uv-pep508 unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep440" -item = "version::VersionPattern::wildcard" -level = "expect" -reason = "used by uv-pep508 unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_fs" -item = "copy_dir_all" -level = "expect" -reason = "used by uv and uv-build-backend integration tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_fs" -item = "copy_atomic_sync" -level = "expect" -target = "cfg(not(unix))" -reason = "used by uv-install-wheel only when analyzing a Unix target" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_fs" -item = "with_retry_sync" -level = "expect" -target = "cfg(unix)" -reason = "used by uv-install-wheel only when analyzing a non-Unix target" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pypi_types" -item = "dependency_groups::DependencyGroups::get" -level = "expect" -reason = "used by uv-workspace unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pypi_types" -item = "dependency_groups::DependencyGroups::iter" -level = "expect" -reason = "required companion to IntoIterator for &DependencyGroups" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::BaseClientBuilder::<'a>::extra_middleware" -level = "expect" -reason = "supported public middleware extension API" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "registry_client::RegistryClientBuilder::<'a>::extra_middleware" -level = "expect" -reason = "supported public middleware extension API" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "registry_client::RegistryClientBuilder::<'a>::with_reqwest_client" -level = "expect" -reason = "supported public custom HTTP client API" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::BaseClientBuilder::<'a>::proxy" -level = "expect" -reason = "supported public proxy configuration API" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "registry_client::RegistryClientBuilder::<'a>::proxy" -level = "expect" -reason = "supported public proxy configuration API" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::BaseClientBuilder::<'a>::no_retry_delay" -level = "expect" -reason = "used by uv-client integration tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::RequestBuilder::<'a>::raw_builder" -level = "expect" -reason = "used by uv-publish unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::BaseClientBuilder::<'a>::with_system_certs" -level = "expect" -reason = "used by uv-client integration tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_workspace" -item = "workspace::ProjectWorkspace::discover" -level = "expect" -reason = "used by uv-distribution unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_resolver" -item = "exclude_newer::ExcludeNewer::global" -level = "expect" -reason = "used by uv-bench benchmarks" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "registry_client::RegistryClient::fetch_simple_index" -level = "expect" -reason = "used by the uv-dev package listing tool" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_options_metadata" -item = "OptionSet::documentation" -level = "expect" -reason = "used by uv-dev options reference generation" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "registry_client::SimpleIndexMetadata::iter" -level = "expect" -reason = "used by the uv-dev package listing tool" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_python" -item = "managed::platform_key_from_env" -level = "expect" -reason = "used by uv integration tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_auth" -item = "middleware::AuthMiddleware::with_cache" -level = "expect" -reason = "used by uv-auth unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_fastid" -item = "Id::secure" -level = "expect" -reason = "used by uv-fastid unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_installer" -item = "installer::Installer::<'a>::with_installer_name" -level = "expect" -reason = "used by uv-installer unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_python" -item = "downloads::ManagedPythonDownload::python_version" -level = "expect" -reason = "used by uv-python unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_python" -item = "managed::ManagedPythonInstallations::temp" -level = "expect" -reason = "used by uv-python unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_python" -item = "interpreter::Interpreter::pointer_size" -level = "expect" -target = "cfg(not(unix))" -reason = "used by uv-virtualenv only when analyzing a Unix target" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_python" -item = "pointer_size::PointerSize::is_64" -level = "expect" -target = "cfg(not(unix))" -reason = "used by uv-virtualenv only when analyzing a Unix target" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "index_url::IndexLocations::simple_api_cache_control_for" -level = "expect" -reason = "used by uv-distribution-types unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep508" -item = "marker::tree::MarkerExpression::from_str" -level = "expect" -reason = "used by uv-pep508 unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep508" -item = "marker::tree::MarkerTree::simplify_not_extras" -level = "expect" -reason = "used by uv-pep508 unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "set_default_credential_builder" -level = "expect" -reason = "public mock credential API documented for tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::new_with_target" -level = "expect" -reason = "used by uv-keyring platform unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::new_with_credential" -level = "expect" -reason = "used by uv-keyring platform unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::get_attributes" -level = "expect" -reason = "used by uv-keyring platform unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::update_attributes" -level = "expect" -reason = "used by uv-keyring platform unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::get_credential" -level = "expect" -reason = "used by uv-keyring platform unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "macos::MacCredential::get_credential" -level = "expect" -target = "cfg(target_os = \"macos\")" -reason = "used by uv-keyring platform unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "windows::WinCredential::get_credential" -level = "expect" -target = "cfg(windows)" -reason = "used by uv-keyring platform unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "mock::MockCredential::set_error" -level = "expect" -reason = "used by uv-keyring mock unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "mock::default_credential_builder" -level = "expect" -reason = "public mock credential API documented for tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_windows" -item = "ctrl_handler::CtrlHandlerError::code" -level = "expect" -target = "cfg(windows)" -reason = "used by the uv-trampoline binary outside the selected uv graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_windows" -item = "job::JobError::code" -level = "expect" -target = "cfg(windows)" -reason = "used by the uv-trampoline binary outside the selected uv graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_windows" -item = "job::JobError::message" -level = "expect" -target = "cfg(windows)" -reason = "used by the uv-trampoline binary outside the selected uv graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_windows" -item = "job::Job::new" -level = "expect" -target = "cfg(windows)" -reason = "used by the uv-trampoline binary outside the selected uv graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_windows" -item = "job::Job::assign_process" -level = "expect" -target = "cfg(windows)" -reason = "used by the uv-trampoline binary outside the selected uv graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "PACKSE_VERSION" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "DEFAULT_PYTHON_VERSION" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "LATEST_PYTHON_3_15" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "LATEST_PYTHON_3_14" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "LATEST_PYTHON_3_13" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "LATEST_PYTHON_3_12" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "LATEST_PYTHON_3_11" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "LATEST_PYTHON_3_10" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "build_vendor_links_url" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "packse_index_url" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "INSTA_FILTERS" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::new_with_bin" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_exclude_newer" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_http_timeout" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_concurrent_installs" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_counts" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_cache_size" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_missing_file_error" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_exe_suffix" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_python_sources" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_python_names" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_virtualenv_bin" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_python_install_bin" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_pyvenv_cfg_filters" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_python_symlinks" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_path" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_link_mode_warning" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_not_executable" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_python_keys" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_latest_python_versions" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_windows_temp_dir" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_compiled_file_count" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_current_version" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_cyclonedx_filters" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_collapsed_whitespace" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_python_download_cache" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_empty_python_install_mirror" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_managed_python_dirs" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_versions_as_managed" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filter" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_unset_git_credential_helper" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::clear_filters" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_cache_on_cow_fs" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_cache_on_alt_fs" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_cache_on_lowlinks_fs" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_cache_on_nocow_fs" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_working_dir_on_cow_fs" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_working_dir_on_nocow_fs" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::test_bucket_dir" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::new_with_versions_and_bin" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::command" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::disallow_git_cli" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_git_lfs_config" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::add_shared_options" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::add_shared_args" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::add_shared_env" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_compile" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_sync" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_show" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_freeze" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_check" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_list" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::venv" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_install" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_uninstall" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_tree" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_debug" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::help" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::init" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::sync" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::lock" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::audit" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::workspace_metadata" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::workspace_dir" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::workspace_list" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::export" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::format" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::build" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::version" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::self_version" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::self_update" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::publish" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_find" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_list" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_install" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_uninstall" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_upgrade" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_pin" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_dir" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::run" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::tool_run" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::tool_upgrade" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::tool_install" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::tool_list" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::tool_dir" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::tool_uninstall" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::add" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::remove" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::tree" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::clean" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::prune" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::cache_size" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::build_backend" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::interpreter" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_command" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::auth_login" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::auth_logout" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::auth_helper" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::auth_token" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_real_home" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::assert_command" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::assert_file" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::assert_installed" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::assert_not_installed" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::path_patterns" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_path" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::filters" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::filters_without_standard_filters" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_kind" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::site_packages" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::reset_venv" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::copy_ecosystem_project" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::diff_lock" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::read" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "diff_snapshot" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "site_packages_path" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "venv_bin_path" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "get_python" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "create_venv_from_executable" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "python_path_with_versions" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "python_installations_for_versions" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "apply_filters" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "run_and_format" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "run_and_format_with_status" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "copy_dir_ignore" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "make_project" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "READ_ONLY_GITHUB_TOKEN" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "READ_ONLY_GITHUB_TOKEN_2" -level = "expect" -target = "cfg(not(windows))" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "READ_ONLY_GITHUB_SSH_DEPLOY_KEY" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "decode_token" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "download_to_disk" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "ReadOnlyDirectoryGuard::new" -level = "expect" -target = "cfg(unix)" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_distribution_types" -item = "config_settings::ConfigSettings::is_empty" -level = "expect" -reason = "kept public alongside the public len method" - From a1f84233670727e6075578a6ef00a1d50cfbbcd0 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 26 May 2026 23:02:14 +0200 Subject: [PATCH 07/11] Remove re-exports --- crates/uv-auth/src/lib.rs | 6 ++++-- crates/uv-build-backend/src/lib.rs | 3 ++- crates/uv-client/src/lib.rs | 6 ++++-- crates/uv-git/src/lib.rs | 3 ++- crates/uv-keyring/src/lib.rs | 3 ++- crates/uv-pep508/src/lib.rs | 7 ++++--- crates/uv-pep508/src/marker/mod.rs | 10 ++++++---- crates/uv-platform/src/lib.rs | 3 ++- crates/uv-python/src/lib.rs | 5 +++-- crates/uv-resolver/src/lib.rs | 15 +++++++++------ crates/uv-resolver/src/pubgrub/mod.rs | 2 +- crates/uv-resolver/src/resolver/mod.rs | 4 ++-- crates/uv-tool/src/lib.rs | 2 +- 13 files changed, 42 insertions(+), 27 deletions(-) diff --git a/crates/uv-auth/src/lib.rs b/crates/uv-auth/src/lib.rs index 1748402f9748f..f218dd25db5b9 100644 --- a/crates/uv-auth/src/lib.rs +++ b/crates/uv-auth/src/lib.rs @@ -9,8 +9,10 @@ pub use pyx::{ is_default_pyx_domain, }; pub use realm::{Realm, RealmRef}; -pub use service::{Service, ServiceParseError}; -pub use store::{AuthBackend, AuthScheme, TextCredentialStore, TomlCredentialError}; +pub use service::Service; +pub(crate) use service::ServiceParseError; +pub(crate) use store::AuthScheme; +pub use store::{AuthBackend, TextCredentialStore, TomlCredentialError}; mod access_token; mod cache; diff --git a/crates/uv-build-backend/src/lib.rs b/crates/uv-build-backend/src/lib.rs index 5934645965c54..a48380ac85081 100644 --- a/crates/uv-build-backend/src/lib.rs +++ b/crates/uv-build-backend/src/lib.rs @@ -5,7 +5,8 @@ mod settings; mod source_dist; mod wheel; -pub use metadata::{PyProjectToml, check_direct_build}; +pub(crate) use metadata::PyProjectToml; +pub use metadata::check_direct_build; pub use settings::{BuildBackendSettings, WheelDataIncludes}; pub use source_dist::{build_source_dist, list_source_dist}; use uv_warnings::warn_user_once; diff --git a/crates/uv-client/src/lib.rs b/crates/uv-client/src/lib.rs index 327edb7b0c2c4..6a7880b31c15e 100644 --- a/crates/uv-client/src/lib.rs +++ b/crates/uv-client/src/lib.rs @@ -7,11 +7,13 @@ pub use base_client::{ pub use cached_client::{CacheControl, CachedClient, CachedClientError, DataWithCachePolicy}; pub use error::{Error, ErrorKind, ProblemDetails, WrappedReqwestError}; pub use flat_index::{FlatIndexClient, FlatIndexEntries, FlatIndexEntry, FlatIndexError}; +pub(crate) use registry_client::SimpleIndexMetadata; pub use registry_client::{ Connectivity, MetadataFormat, RegistryClient, RegistryClientBuilder, SimpleDetailMetadata, - SimpleDetailMetadatum, SimpleIndexMetadata, VersionFiles, + SimpleDetailMetadatum, VersionFiles, }; -pub use retry::{RetriableError, RetryState, UvRetryableStrategy, retryable_on_request_failure}; +pub(crate) use retry::UvRetryableStrategy; +pub use retry::{RetriableError, RetryState, retryable_on_request_failure}; pub use rkyvutil::OwnedArchive; mod base_client; diff --git a/crates/uv-git/src/lib.rs b/crates/uv-git/src/lib.rs index 2178b99c5fbb2..2e71c1823dd9e 100644 --- a/crates/uv-git/src/lib.rs +++ b/crates/uv-git/src/lib.rs @@ -3,7 +3,8 @@ pub use crate::git::{GIT, GIT_LFS, GitError}; pub use crate::resolver::{ GitResolver, GitResolverError, RepositoryReference, ResolvedRepositoryReference, }; -pub use crate::source::{Fetch, GitSource, Reporter}; +pub(crate) use crate::source::GitSource; +pub use crate::source::{Fetch, Reporter}; mod credentials; mod git; diff --git a/crates/uv-keyring/src/lib.rs b/crates/uv-keyring/src/lib.rs index 1248fafe971ae..161463d8b747b 100644 --- a/crates/uv-keyring/src/lib.rs +++ b/crates/uv-keyring/src/lib.rs @@ -155,7 +155,8 @@ are not recommended, as they may cause the RPC mechanism to fail. use std::collections::HashMap; -pub use credential::{Credential, CredentialBuilder}; +pub use credential::Credential; +pub(crate) use credential::CredentialBuilder; pub use error::{Error, Result}; #[cfg(any(target_os = "macos", target_os = "windows"))] diff --git a/crates/uv-pep508/src/lib.rs b/crates/uv-pep508/src/lib.rs index 911a33add6047..5b23ec9b27581 100644 --- a/crates/uv-pep508/src/lib.rs +++ b/crates/uv-pep508/src/lib.rs @@ -34,10 +34,11 @@ use crate::cursor::Cursor; pub use crate::marker::{ CanonicalMarkerValueExtra, CanonicalMarkerValueString, CanonicalMarkerValueVersion, ContainsMarkerTree, ExtraMarkerTree, ExtraOperator, InMarkerTree, MarkerEnvironment, - MarkerEnvironmentBuilder, MarkerExpression, MarkerOperator, MarkerTree, MarkerTreeContents, - MarkerTreeKind, MarkerValue, MarkerValueExtra, MarkerValueList, MarkerValueString, - MarkerValueVersion, MarkerWarningKind, StringMarkerTree, StringVersion, VersionMarkerTree, + MarkerExpression, MarkerOperator, MarkerTree, MarkerTreeContents, MarkerTreeKind, + MarkerValueExtra, MarkerValueList, MarkerValueString, MarkerValueVersion, StringMarkerTree, + StringVersion, VersionMarkerTree, }; +pub(crate) use crate::marker::{MarkerEnvironmentBuilder, MarkerValue, MarkerWarningKind}; pub use crate::origin::RequirementOrigin; #[cfg(feature = "non-pep508-extensions")] pub use crate::unnamed::{UnnamedRequirement, UnnamedRequirementUrl}; diff --git a/crates/uv-pep508/src/marker/mod.rs b/crates/uv-pep508/src/marker/mod.rs index 1f4e311f94d7b..a33103f41fe23 100644 --- a/crates/uv-pep508/src/marker/mod.rs +++ b/crates/uv-pep508/src/marker/mod.rs @@ -16,16 +16,18 @@ pub(crate) mod parse; mod simplify; mod tree; -pub use environment::{MarkerEnvironment, MarkerEnvironmentBuilder}; +pub use environment::MarkerEnvironment; +pub(crate) use environment::MarkerEnvironmentBuilder; pub use lowering::{ CanonicalMarkerValueExtra, CanonicalMarkerValueString, CanonicalMarkerValueVersion, }; pub use tree::{ ContainsMarkerTree, ExtraMarkerTree, ExtraOperator, InMarkerTree, MarkerExpression, - MarkerOperator, MarkerTree, MarkerTreeContents, MarkerTreeKind, MarkerValue, MarkerValueExtra, - MarkerValueList, MarkerValueString, MarkerValueVersion, MarkerWarningKind, StringMarkerTree, - StringVersion, VersionMarkerTree, + MarkerOperator, MarkerTree, MarkerTreeContents, MarkerTreeKind, MarkerValueExtra, + MarkerValueList, MarkerValueString, MarkerValueVersion, StringMarkerTree, StringVersion, + VersionMarkerTree, }; +pub(crate) use tree::{MarkerValue, MarkerWarningKind}; /// `serde` helpers for [`MarkerTree`]. pub mod ser { diff --git a/crates/uv-platform/src/lib.rs b/crates/uv-platform/src/lib.rs index f5e87b07047cf..317799058ae0c 100644 --- a/crates/uv-platform/src/lib.rs +++ b/crates/uv-platform/src/lib.rs @@ -9,7 +9,8 @@ use tracing::trace; pub use crate::arch::{Arch, ArchVariant}; pub use crate::host::{LinuxOsRelease, OsRelease, OsType}; -pub use crate::libc::{Libc, LibcDetectionError, LibcVersion}; +pub(crate) use crate::libc::LibcVersion; +pub use crate::libc::{Libc, LibcDetectionError}; pub use crate::os::Os; mod arch; diff --git a/crates/uv-python/src/lib.rs b/crates/uv-python/src/lib.rs index e97673e435d83..77e4ca79e8624 100644 --- a/crates/uv-python/src/lib.rs +++ b/crates/uv-python/src/lib.rs @@ -9,7 +9,7 @@ pub use crate::discovery::{ PythonPreference, PythonRequest, PythonSource, PythonVariant, VersionRequest, find_python_installations, }; -pub use crate::downloads::PlatformRequest; +pub(crate) use crate::downloads::PlatformRequest; pub use crate::environment::{InvalidEnvironmentKind, PythonEnvironment}; pub use crate::implementation::{ImplementationName, LenientImplementationName}; pub use crate::installation::{ @@ -22,9 +22,10 @@ pub use crate::pointer_size::PointerSize; pub use crate::prefix::Prefix; pub use crate::python_version::{BuildVersionError, PythonVersion}; pub use crate::target::Target; +pub(crate) use crate::version_files::PYTHON_VERSIONS_FILENAME; pub use crate::version_files::{ DiscoveryOptions as VersionFileDiscoveryOptions, FilePreference as VersionFilePreference, - PYTHON_VERSION_FILENAME, PYTHON_VERSIONS_FILENAME, PythonVersionFile, + PYTHON_VERSION_FILENAME, PythonVersionFile, }; pub use crate::virtualenv::{Error as VirtualEnvError, PyVenvConfiguration, VirtualEnvironment}; diff --git a/crates/uv-resolver/src/lib.rs b/crates/uv-resolver/src/lib.rs index 1cab6365ae06d..e40256c3d6a4c 100644 --- a/crates/uv-resolver/src/lib.rs +++ b/crates/uv-resolver/src/lib.rs @@ -1,9 +1,11 @@ pub use dependency_mode::DependencyMode; -pub use error::{ErrorTree, NoSolutionError, NoSolutionHeader, ResolveError, SentinelRange}; +pub(crate) use error::ErrorTree; +pub use error::{NoSolutionError, NoSolutionHeader, ResolveError, SentinelRange}; +pub(crate) use exclude_newer::ExcludeNewerValueWithSpanRef; pub use exclude_newer::{ ExcludeNewer, ExcludeNewerChange, ExcludeNewerOverrideChange, ExcludeNewerPackage, ExcludeNewerPackageChange, ExcludeNewerPackageEntry, ExcludeNewerValueChange, - ExcludeNewerValueWithSpanRef, serialize_exclude_newer_package_with_spans, + serialize_exclude_newer_package_with_spans, }; pub use exclusions::Exclusions; pub use flat_index::{FlatDistributions, FlatIndex}; @@ -24,11 +26,12 @@ pub use resolution::{ }; pub use resolution_mode::ResolutionMode; pub use resolver::{ - DefaultResolverProvider, InMemoryIndex, MetadataResponse, PackageVersionsResult, - Reporter as ResolverReporter, Resolver, ResolverEnvironment, ResolverProvider, - VersionsResponse, WheelMetadataResult, + DefaultResolverProvider, InMemoryIndex, MetadataResponse, Reporter as ResolverReporter, + Resolver, ResolverEnvironment, ResolverProvider, VersionsResponse, }; -pub use universal_marker::{ConflictMarker, UniversalMarker}; +pub(crate) use resolver::{PackageVersionsResult, WheelMetadataResult}; +pub(crate) use universal_marker::ConflictMarker; +pub use universal_marker::UniversalMarker; pub use upgrade::UpgradePackages; pub use uv_distribution_types::{ExcludeNewerOverride, ExcludeNewerSpan, ExcludeNewerValue}; pub use version_map::VersionMap; diff --git a/crates/uv-resolver/src/pubgrub/mod.rs b/crates/uv-resolver/src/pubgrub/mod.rs index 352aea0f5023a..6cbeaa729c22a 100644 --- a/crates/uv-resolver/src/pubgrub/mod.rs +++ b/crates/uv-resolver/src/pubgrub/mod.rs @@ -1,5 +1,5 @@ pub(crate) use crate::pubgrub::dependencies::{DependencySource, PubGrubDependency}; -pub use crate::pubgrub::package::{PubGrubPackage, PubGrubPackageInner, PubGrubPython}; +pub(crate) use crate::pubgrub::package::{PubGrubPackage, PubGrubPackageInner, PubGrubPython}; pub(crate) use crate::pubgrub::priority::{PubGrubPriorities, PubGrubPriority, PubGrubTiebreaker}; pub use crate::pubgrub::report::PubGrubHint; pub(crate) use crate::pubgrub::report::PubGrubReportFormatter; diff --git a/crates/uv-resolver/src/resolver/mod.rs b/crates/uv-resolver/src/resolver/mod.rs index 365b7ec4202d8..08c998e2a1ff3 100644 --- a/crates/uv-resolver/src/resolver/mod.rs +++ b/crates/uv-resolver/src/resolver/mod.rs @@ -71,9 +71,9 @@ pub(crate) use crate::resolver::fork_map::{ForkMap, ForkSet}; pub use crate::resolver::index::InMemoryIndex; use crate::resolver::indexes::Indexes; pub use crate::resolver::provider::{ - DefaultResolverProvider, MetadataResponse, PackageVersionsResult, ResolverProvider, - VersionsResponse, WheelMetadataResult, + DefaultResolverProvider, MetadataResponse, ResolverProvider, VersionsResponse, }; +pub(crate) use crate::resolver::provider::{PackageVersionsResult, WheelMetadataResult}; pub use crate::resolver::reporter::Reporter; use crate::resolver::system::SystemDependency; pub(crate) use crate::resolver::urls::Urls; diff --git a/crates/uv-tool/src/lib.rs b/crates/uv-tool/src/lib.rs index cc667aea7c1e8..bb84c9e9e56ae 100644 --- a/crates/uv-tool/src/lib.rs +++ b/crates/uv-tool/src/lib.rs @@ -19,7 +19,7 @@ use uv_python::{BrokenLink, Interpreter, PythonEnvironment}; use uv_state::{StateBucket, StateStore}; use uv_static::EnvVars; -pub use receipt::ToolReceipt; +pub(crate) use receipt::ToolReceipt; pub use tool::{Tool, ToolEntrypoint}; mod receipt; From ced0cd78063749aa1927b91fb859e6195dc3522c Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 26 May 2026 23:08:25 +0200 Subject: [PATCH 08/11] Reduce visibility --- crates/uv-auth/src/pyx.rs | 8 +- crates/uv-build-backend/src/settings.rs | 16 +- crates/uv-cli/src/lib.rs | 152 ++++++++-------- crates/uv-client/src/error.rs | 10 +- crates/uv-configuration/src/concurrency.rs | 2 +- .../uv-configuration/src/dependency_groups.rs | 14 +- crates/uv-configuration/src/extras.rs | 12 +- .../uv-configuration/src/install_options.rs | 16 +- crates/uv-distribution-types/src/index.rs | 4 +- crates/uv-distribution-types/src/installed.rs | 30 ++-- .../src/metadata/build_requires.rs | 2 +- crates/uv-install-wheel/src/record.rs | 4 +- crates/uv-keyring/src/credential.rs | 4 - crates/uv-keyring/src/macos.rs | 6 +- crates/uv-keyring/src/mock.rs | 6 +- crates/uv-logging/src/lib.rs | 6 +- crates/uv-netrc/src/netrc.rs | 4 +- crates/uv-pep440/src/version.rs | 4 +- crates/uv-pep508/src/lib.rs | 6 +- crates/uv-publish/src/lib.rs | 2 +- crates/uv-pypi-types/src/direct_url.rs | 4 +- crates/uv-python/src/discovery.rs | 6 +- crates/uv-resolver/src/exclude_newer.rs | 4 +- crates/uv-resolver/src/options.rs | 8 +- crates/uv-scripts/src/lib.rs | 4 +- crates/uv-settings/src/lib.rs | 8 +- crates/uv-settings/src/settings.rs | 168 +++++++++--------- crates/uv-static/src/env_vars.rs | 70 ++++---- crates/uv-test/src/lib.rs | 22 +-- crates/uv-trampoline-builder/src/lib.rs | 2 +- crates/uv-workspace/src/dependency_groups.rs | 2 +- crates/uv-workspace/src/pyproject.rs | 13 +- 32 files changed, 308 insertions(+), 311 deletions(-) diff --git a/crates/uv-auth/src/pyx.rs b/crates/uv-auth/src/pyx.rs index 8d55adf183bba..772e678972419 100644 --- a/crates/uv-auth/src/pyx.rs +++ b/crates/uv-auth/src/pyx.rs @@ -46,8 +46,8 @@ fn read_pyx_auth_token() -> Option { /// and a new refresh token. #[derive(Debug, Clone, serde::Deserialize, serde::Serialize)] pub struct PyxOAuthTokens { - pub access_token: AccessToken, - pub refresh_token: String, + pub(crate) access_token: AccessToken, + pub(crate) refresh_token: String, } /// An access token with an accompanying API key. @@ -583,9 +583,9 @@ impl TokenStoreError { #[derive(Debug, serde::Deserialize)] pub struct PyxJwt { /// The expiration time of the JWT, as a Unix timestamp. - pub exp: Option, + pub(crate) exp: Option, /// The issuer of the JWT. - pub iss: Option, + pub(crate) iss: Option, /// The name of the organization, if any. #[serde(rename = "urn:pyx:org_name")] pub name: Option, diff --git a/crates/uv-build-backend/src/settings.rs b/crates/uv-build-backend/src/settings.rs index c39525f26988e..5deb1b86d7acc 100644 --- a/crates/uv-build-backend/src/settings.rs +++ b/crates/uv-build-backend/src/settings.rs @@ -21,7 +21,7 @@ pub struct BuildBackendSettings { value_type = "str", example = r#"module-root = """# )] - pub module_root: PathBuf, + pub(crate) module_root: PathBuf, /// The name of the module directory inside `module-root`. /// @@ -46,7 +46,7 @@ pub struct BuildBackendSettings { value_type = "str | list[str]", example = r#"module-name = "sklearn""# )] - pub module_name: Option, + pub(crate) module_name: Option, /// Glob expressions which files and directories to additionally include in the source /// distribution. @@ -57,7 +57,7 @@ pub struct BuildBackendSettings { value_type = "list[str]", example = r#"source-include = ["tests/**"]"# )] - pub source_include: Vec, + pub(crate) source_include: Vec, /// If set to `false`, the default excludes aren't applied. /// @@ -67,7 +67,7 @@ pub struct BuildBackendSettings { value_type = "bool", example = r#"default-excludes = false"# )] - pub default_excludes: bool, + pub(crate) default_excludes: bool, /// Glob expressions which files and directories to exclude from the source distribution. /// @@ -78,7 +78,7 @@ pub struct BuildBackendSettings { value_type = "list[str]", example = r#"source-exclude = ["*.bin"]"# )] - pub source_exclude: Vec, + pub(crate) source_exclude: Vec, /// Glob expressions which files and directories to exclude from the wheel. #[option( @@ -86,7 +86,7 @@ pub struct BuildBackendSettings { value_type = "list[str]", example = r#"wheel-exclude = ["*.bin"]"# )] - pub wheel_exclude: Vec, + pub(crate) wheel_exclude: Vec, /// Build a namespace package. /// @@ -136,7 +136,7 @@ pub struct BuildBackendSettings { value_type = "bool", example = r#"namespace = true"# )] - pub namespace: bool, + pub(crate) namespace: bool, /// Data includes for wheels. /// @@ -170,7 +170,7 @@ pub struct BuildBackendSettings { value_type = "dict[str, str]", example = r#"data = { headers = "include/headers", scripts = "bin" }"# )] - pub data: WheelDataIncludes, + pub(crate) data: WheelDataIncludes, } impl Default for BuildBackendSettings { diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index 5fd42f03bd3d3..efbb3f1a6ccd0 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -211,7 +211,7 @@ pub struct GlobalArgs { /// Deprecated version of [`Self::python_downloads`]. #[arg(global = true, long, hide = true)] - pub python_fetch: Option, + pub(crate) python_fetch: Option, /// Use quiet output. /// @@ -2903,16 +2903,16 @@ pub struct PipTreeArgs { #[derive(Args)] pub struct PipDebugArgs { #[arg(long, hide = true)] - pub platform: Option, + pub(crate) platform: Option, #[arg(long, hide = true)] - pub python_version: Option, + pub(crate) python_version: Option, #[arg(long, hide = true)] - pub implementation: Option, + pub(crate) implementation: Option, #[arg(long, hide = true)] - pub abi: Option, + pub(crate) abi: Option, } #[derive(Args)] @@ -5621,7 +5621,7 @@ pub struct UvxArgs { /// Display the uvx version. #[arg(short = 'V', long, action = clap::ArgAction::Version)] - pub version: Option, + pub(crate) version: Option, } #[derive(Args)] @@ -6758,7 +6758,7 @@ pub struct AuthLogoutArgs { value_enum, env = EnvVars::UV_KEYRING_PROVIDER, )] - pub keyring_provider: Option, + pub(crate) keyring_provider: Option, } #[derive(Args)] @@ -6794,7 +6794,7 @@ pub struct AuthLoginArgs { value_enum, env = EnvVars::UV_KEYRING_PROVIDER, )] - pub keyring_provider: Option, + pub(crate) keyring_provider: Option, } #[derive(Args)] @@ -6813,7 +6813,7 @@ pub struct AuthTokenArgs { value_enum, env = EnvVars::UV_KEYRING_PROVIDER, )] - pub keyring_provider: Option, + pub(crate) keyring_provider: Option, } #[derive(Args)] @@ -6854,35 +6854,35 @@ pub struct GenerateShellCompletionArgs { // Hide unused global options. #[arg(long, short, hide = true)] - pub no_cache: bool, + pub(crate) no_cache: bool, #[arg(long, hide = true)] - pub cache_dir: Option, + pub(crate) cache_dir: Option, #[arg(long, hide = true)] - pub python_preference: Option, + pub(crate) python_preference: Option, #[arg(long, hide = true)] - pub no_python_downloads: bool, + pub(crate) no_python_downloads: bool, #[arg(long, short, action = clap::ArgAction::Count, conflicts_with = "verbose", hide = true)] - pub quiet: u8, + pub(crate) quiet: u8, #[arg(long, short, action = clap::ArgAction::Count, conflicts_with = "quiet", hide = true)] - pub verbose: u8, + pub(crate) verbose: u8, #[arg(long, conflicts_with = "no_color", hide = true)] - pub color: Option, + pub(crate) color: Option, #[arg(long, hide = true)] - pub native_tls: bool, + pub(crate) native_tls: bool, #[arg(long, hide = true)] - pub offline: bool, + pub(crate) offline: bool, #[arg(long, hide = true)] - pub no_progress: bool, + pub(crate) no_progress: bool, #[arg(long, hide = true)] - pub config_file: Option, + pub(crate) config_file: Option, #[arg(long, hide = true)] - pub no_config: bool, + pub(crate) no_config: bool, #[arg(long, short, action = clap::ArgAction::HelpShort, hide = true)] - pub help: Option, + pub(crate) help: Option, #[arg(short = 'V', long, hide = true)] - pub version: bool, + pub(crate) version: bool, } #[derive(Args)] @@ -6981,19 +6981,19 @@ pub struct IndexArgs { value_parser = parse_find_links, help_heading = "Index options" )] - pub find_links: Option>>, + pub(crate) find_links: Option>>, /// Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those /// provided via `--find-links`. #[arg(long, help_heading = "Index options")] - pub no_index: bool, + pub(crate) no_index: bool, } #[derive(Args)] pub struct RefreshArgs { /// Refresh all cached data. #[arg(long, overrides_with("no_refresh"), help_heading = "Cache options")] - pub refresh: bool, + pub(crate) refresh: bool, #[arg( long, @@ -7001,11 +7001,11 @@ pub struct RefreshArgs { hide = true, help_heading = "Cache options" )] - pub no_refresh: bool, + pub(crate) no_refresh: bool, /// Refresh cached data for a specific package. #[arg(long, help_heading = "Cache options", value_hint = ValueHint::Other)] - pub refresh_package: Vec, + pub(crate) refresh_package: Vec, } #[derive(Args)] @@ -7022,7 +7022,7 @@ pub struct BuildOptionsArgs { value_parser = clap::builder::BoolishValueParser::new(), help_heading = "Build options", )] - pub no_build: bool, + pub(crate) no_build: bool, #[arg( long, @@ -7030,7 +7030,7 @@ pub struct BuildOptionsArgs { hide = true, help_heading = "Build options" )] - pub build: bool, + pub(crate) build: bool, /// Don't build source distributions for a specific package [env: `UV_NO_BUILD_PACKAGE`=] #[arg( @@ -7039,7 +7039,7 @@ pub struct BuildOptionsArgs { value_delimiter = ' ', value_hint = ValueHint::Other, )] - pub no_build_package: Vec, + pub(crate) no_build_package: Vec, /// Don't install pre-built wheels. /// @@ -7052,7 +7052,7 @@ pub struct BuildOptionsArgs { value_parser = clap::builder::BoolishValueParser::new(), help_heading = "Build options" )] - pub no_binary: bool, + pub(crate) no_binary: bool, #[arg( long, @@ -7060,7 +7060,7 @@ pub struct BuildOptionsArgs { hide = true, help_heading = "Build options" )] - pub binary: bool, + pub(crate) binary: bool, /// Don't install pre-built wheels for a specific package [env: `UV_NO_BINARY_PACKAGE`=] #[arg( @@ -7069,14 +7069,14 @@ pub struct BuildOptionsArgs { value_delimiter = ' ', value_hint = ValueHint::Other, )] - pub no_binary_package: Vec, + pub(crate) no_binary_package: Vec, } /// Arguments that are used by commands that need to install (but not resolve) packages. #[derive(Args)] pub struct InstallerArgs { #[command(flatten)] - pub index_args: IndexArgs, + pub(crate) index_args: IndexArgs, /// Reinstall all packages, regardless of whether they're already installed. Implies /// `--refresh`. @@ -7086,7 +7086,7 @@ pub struct InstallerArgs { overrides_with("no_reinstall"), help_heading = "Installer options" )] - pub reinstall: bool, + pub(crate) reinstall: bool, #[arg( long, @@ -7094,12 +7094,12 @@ pub struct InstallerArgs { hide = true, help_heading = "Installer options" )] - pub no_reinstall: bool, + pub(crate) no_reinstall: bool, /// Reinstall a specific package, regardless of whether it's already installed. Implies /// `--refresh-package`. #[arg(long, help_heading = "Installer options", value_hint = ValueHint::Other)] - pub reinstall_package: Vec, + pub(crate) reinstall_package: Vec, /// The strategy to use when resolving against multiple index URLs. /// @@ -7113,7 +7113,7 @@ pub struct InstallerArgs { env = EnvVars::UV_INDEX_STRATEGY, help_heading = "Index options" )] - pub index_strategy: Option, + pub(crate) index_strategy: Option, /// Attempt to use `keyring` for authentication for index URLs. /// @@ -7127,7 +7127,7 @@ pub struct InstallerArgs { env = EnvVars::UV_KEYRING_PROVIDER, help_heading = "Index options" )] - pub keyring_provider: Option, + pub(crate) keyring_provider: Option, /// Settings to pass to the PEP 517 build backend, specified as `KEY=VALUE` pairs. #[arg( @@ -7136,7 +7136,7 @@ pub struct InstallerArgs { alias = "config-settings", help_heading = "Build options" )] - pub config_setting: Option>, + pub(crate) config_setting: Option>, /// Settings to pass to the PEP 517 build backend for a specific package, specified as `PACKAGE:KEY=VALUE` pairs. #[arg( @@ -7144,7 +7144,7 @@ pub struct InstallerArgs { alias = "config-settings-package", help_heading = "Build options" )] - pub config_settings_package: Option>, + pub(crate) config_settings_package: Option>, /// Disable isolation when building source distributions. /// @@ -7156,7 +7156,7 @@ pub struct InstallerArgs { env = EnvVars::UV_NO_BUILD_ISOLATION, value_parser = clap::builder::BoolishValueParser::new(), )] - pub no_build_isolation: bool, + pub(crate) no_build_isolation: bool, #[arg( long, @@ -7164,7 +7164,7 @@ pub struct InstallerArgs { hide = true, help_heading = "Build options" )] - pub build_isolation: bool, + pub(crate) build_isolation: bool, /// Limit candidate packages to those that were uploaded prior to the given date. /// @@ -7181,7 +7181,7 @@ pub struct InstallerArgs { /// number of seconds assuming that a day is 24 hours (e.g., DST transitions are ignored). /// Calendar units such as months and years are not allowed. #[arg(long, env = EnvVars::UV_EXCLUDE_NEWER, help_heading = "Resolver options")] - pub exclude_newer: Option, + pub(crate) exclude_newer: Option, /// Limit candidate packages for specific packages to those that were uploaded prior to the /// given date. @@ -7198,7 +7198,7 @@ pub struct InstallerArgs { /// /// Can be provided multiple times for different packages. #[arg(long, help_heading = "Resolver options")] - pub exclude_newer_package: Option>, + pub(crate) exclude_newer_package: Option>, /// The method to use when installing packages from the global cache. /// @@ -7215,7 +7215,7 @@ pub struct InstallerArgs { env = EnvVars::UV_LINK_MODE, help_heading = "Installer options" )] - pub link_mode: Option, + pub(crate) link_mode: Option, /// Compile Python files to bytecode after installation. /// @@ -7235,7 +7235,7 @@ pub struct InstallerArgs { env = EnvVars::UV_COMPILE_BYTECODE, value_parser = clap::builder::BoolishValueParser::new(), )] - pub compile_bytecode: bool, + pub(crate) compile_bytecode: bool, #[arg( long, @@ -7244,7 +7244,7 @@ pub struct InstallerArgs { hide = true, help_heading = "Installer options" )] - pub no_compile_bytecode: bool, + pub(crate) no_compile_bytecode: bool, /// Ignore the `tool.uv.sources` table when resolving dependencies. Used to lock against the /// standards-compliant, publishable package metadata, as opposed to using any workspace, Git, @@ -7255,18 +7255,18 @@ pub struct InstallerArgs { value_parser = clap::builder::BoolishValueParser::new(), help_heading = "Resolver options" )] - pub no_sources: bool, + pub(crate) no_sources: bool, /// Don't use sources from the `tool.uv.sources` table for the specified packages [env: `UV_NO_SOURCES_PACKAGE`=] #[arg(long, help_heading = "Resolver options", value_delimiter = ' ')] - pub no_sources_package: Vec, + pub(crate) no_sources_package: Vec, } /// Arguments that are used by commands that need to resolve (but not install) packages. #[derive(Args)] pub struct ResolverArgs { #[command(flatten)] - pub index_args: IndexArgs, + pub(crate) index_args: IndexArgs, /// Allow package upgrades, ignoring pinned versions in any existing output file. Implies /// `--refresh`. @@ -7276,7 +7276,7 @@ pub struct ResolverArgs { overrides_with("no_upgrade"), help_heading = "Resolver options" )] - pub upgrade: bool, + pub(crate) upgrade: bool, #[arg( long, @@ -7284,17 +7284,17 @@ pub struct ResolverArgs { hide = true, help_heading = "Resolver options" )] - pub no_upgrade: bool, + pub(crate) no_upgrade: bool, /// Allow upgrades for a specific package, ignoring pinned versions in any existing output /// file. Implies `--refresh-package`. #[arg(long, short = 'P', help_heading = "Resolver options")] - pub upgrade_package: Vec>, + pub(crate) upgrade_package: Vec>, /// Allow upgrades for all packages in a dependency group, ignoring pinned versions in any /// existing output file. #[arg(long, help_heading = "Resolver options")] - pub upgrade_group: Vec, + pub(crate) upgrade_group: Vec, /// The strategy to use when resolving against multiple index URLs. /// @@ -7308,7 +7308,7 @@ pub struct ResolverArgs { env = EnvVars::UV_INDEX_STRATEGY, help_heading = "Index options" )] - pub index_strategy: Option, + pub(crate) index_strategy: Option, /// Attempt to use `keyring` for authentication for index URLs. /// @@ -7322,7 +7322,7 @@ pub struct ResolverArgs { env = EnvVars::UV_KEYRING_PROVIDER, help_heading = "Index options" )] - pub keyring_provider: Option, + pub(crate) keyring_provider: Option, /// The strategy to use when selecting between the different compatible versions for a given /// package requirement. @@ -7334,7 +7334,7 @@ pub struct ResolverArgs { env = EnvVars::UV_RESOLUTION, help_heading = "Resolver options" )] - pub resolution: Option, + pub(crate) resolution: Option, /// The strategy to use when considering pre-release versions. /// @@ -7347,10 +7347,10 @@ pub struct ResolverArgs { env = EnvVars::UV_PRERELEASE, help_heading = "Resolver options" )] - pub prerelease: Option, + pub(crate) prerelease: Option, #[arg(long, hide = true, help_heading = "Resolver options")] - pub pre: bool, + pub(crate) pre: bool, /// The strategy to use when selecting multiple versions of a given package across Python /// versions and platforms. @@ -7368,7 +7368,7 @@ pub struct ResolverArgs { env = EnvVars::UV_FORK_STRATEGY, help_heading = "Resolver options" )] - pub fork_strategy: Option, + pub(crate) fork_strategy: Option, /// Settings to pass to the PEP 517 build backend, specified as `KEY=VALUE` pairs. #[arg( @@ -7377,7 +7377,7 @@ pub struct ResolverArgs { alias = "config-settings", help_heading = "Build options" )] - pub config_setting: Option>, + pub(crate) config_setting: Option>, /// Settings to pass to the PEP 517 build backend for a specific package, specified as `PACKAGE:KEY=VALUE` pairs. #[arg( @@ -7385,7 +7385,7 @@ pub struct ResolverArgs { alias = "config-settings-package", help_heading = "Build options" )] - pub config_settings_package: Option>, + pub(crate) config_settings_package: Option>, /// Disable isolation when building source distributions. /// @@ -7397,13 +7397,13 @@ pub struct ResolverArgs { env = EnvVars::UV_NO_BUILD_ISOLATION, value_parser = clap::builder::BoolishValueParser::new(), )] - pub no_build_isolation: bool, + pub(crate) no_build_isolation: bool, /// Disable isolation when building source distributions for a specific package. /// /// Assumes that the packages' build dependencies specified by PEP 518 are already installed. #[arg(long, help_heading = "Build options", value_hint = ValueHint::Other)] - pub no_build_isolation_package: Vec, + pub(crate) no_build_isolation_package: Vec, #[arg( long, @@ -7411,7 +7411,7 @@ pub struct ResolverArgs { hide = true, help_heading = "Build options" )] - pub build_isolation: bool, + pub(crate) build_isolation: bool, /// Limit candidate packages to those that were uploaded prior to the given date. /// @@ -7428,7 +7428,7 @@ pub struct ResolverArgs { /// number of seconds assuming that a day is 24 hours (e.g., DST transitions are ignored). /// Calendar units such as months and years are not allowed. #[arg(long, env = EnvVars::UV_EXCLUDE_NEWER, help_heading = "Resolver options")] - pub exclude_newer: Option, + pub(crate) exclude_newer: Option, /// Limit candidate packages for specific packages to those that were uploaded prior to the /// given date. @@ -7445,7 +7445,7 @@ pub struct ResolverArgs { /// /// Can be provided multiple times for different packages. #[arg(long, help_heading = "Resolver options")] - pub exclude_newer_package: Option>, + pub(crate) exclude_newer_package: Option>, /// The method to use when installing packages from the global cache. /// @@ -7464,7 +7464,7 @@ pub struct ResolverArgs { env = EnvVars::UV_LINK_MODE, help_heading = "Installer options" )] - pub link_mode: Option, + pub(crate) link_mode: Option, /// Ignore the `tool.uv.sources` table when resolving dependencies. Used to lock against the /// standards-compliant, publishable package metadata, as opposed to using any workspace, Git, @@ -7475,11 +7475,11 @@ pub struct ResolverArgs { value_parser = clap::builder::BoolishValueParser::new(), help_heading = "Resolver options", )] - pub no_sources: bool, + pub(crate) no_sources: bool, /// Don't use sources from the `tool.uv.sources` table for the specified packages [env: `UV_NO_SOURCES_PACKAGE`=] #[arg(long, help_heading = "Resolver options", value_delimiter = ' ')] - pub no_sources_package: Vec, + pub(crate) no_sources_package: Vec, } /// Arguments that are used by commands that need to resolve and install packages. @@ -7763,7 +7763,7 @@ pub struct ResolverInstallerArgs { #[derive(Args)] pub struct FetchArgs { #[command(flatten)] - pub index_args: IndexArgs, + pub(crate) index_args: IndexArgs, /// The strategy to use when resolving against multiple index URLs. /// @@ -7777,7 +7777,7 @@ pub struct FetchArgs { env = EnvVars::UV_INDEX_STRATEGY, help_heading = "Index options" )] - pub index_strategy: Option, + pub(crate) index_strategy: Option, /// Attempt to use `keyring` for authentication for index URLs. /// @@ -7791,7 +7791,7 @@ pub struct FetchArgs { env = EnvVars::UV_KEYRING_PROVIDER, help_heading = "Index options" )] - pub keyring_provider: Option, + pub(crate) keyring_provider: Option, /// Limit candidate packages to those that were uploaded prior to the given date. /// @@ -7808,7 +7808,7 @@ pub struct FetchArgs { /// number of seconds assuming that a day is 24 hours (e.g., DST transitions are ignored). /// Calendar units such as months and years are not allowed. #[arg(long, env = EnvVars::UV_EXCLUDE_NEWER, help_heading = "Resolver options")] - pub exclude_newer: Option, + pub(crate) exclude_newer: Option, } #[derive(Args)] diff --git a/crates/uv-client/src/error.rs b/crates/uv-client/src/error.rs index cd5556a2ce9da..07752c487ec45 100644 --- a/crates/uv-client/src/error.rs +++ b/crates/uv-client/src/error.rs @@ -26,19 +26,19 @@ pub struct ProblemDetails { /// A URI reference that identifies the problem type. /// When dereferenced, it SHOULD provide human-readable documentation for the problem type. #[serde(rename = "type", default = "default_problem_type")] - pub problem_type: String, + pub(crate) problem_type: String, /// A short, human-readable summary of the problem type. - pub title: Option, + pub(crate) title: Option, /// The HTTP status code generated by the origin server for this occurrence of the problem. - pub status: Option, + pub(crate) status: Option, /// A human-readable explanation specific to this occurrence of the problem. - pub detail: Option, + pub(crate) detail: Option, /// A URI reference that identifies the specific occurrence of the problem. - pub instance: Option, + pub(crate) instance: Option, } /// Default problem type URI as per RFC 9457 diff --git a/crates/uv-configuration/src/concurrency.rs b/crates/uv-configuration/src/concurrency.rs index ae468120d1392..9f6519e821e5c 100644 --- a/crates/uv-configuration/src/concurrency.rs +++ b/crates/uv-configuration/src/concurrency.rs @@ -15,7 +15,7 @@ pub struct Concurrency { /// The maximum number of concurrent builds. /// /// Note this value must be non-zero. - pub builds: usize, + pub(crate) builds: usize, /// The maximum number of concurrent installs. /// /// Note this value must be non-zero. diff --git a/crates/uv-configuration/src/dependency_groups.rs b/crates/uv-configuration/src/dependency_groups.rs index 3bba9ffebde3b..df50843829ad2 100644 --- a/crates/uv-configuration/src/dependency_groups.rs +++ b/crates/uv-configuration/src/dependency_groups.rs @@ -224,13 +224,13 @@ impl DependencyGroupsInner { /// Context about a [`DependencyGroups`][] that we've preserved for diagnostics #[derive(Debug, Default, Clone)] pub struct DependencyGroupsHistory { - pub dev_mode: Option, - pub group: Vec, - pub only_group: Vec, - pub no_group: Vec, - pub all_groups: bool, - pub no_default_groups: bool, - pub defaults: DefaultGroups, + pub(crate) dev_mode: Option, + pub(crate) group: Vec, + pub(crate) only_group: Vec, + pub(crate) no_group: Vec, + pub(crate) all_groups: bool, + pub(crate) no_default_groups: bool, + pub(crate) defaults: DefaultGroups, } impl DependencyGroupsHistory { diff --git a/crates/uv-configuration/src/extras.rs b/crates/uv-configuration/src/extras.rs index cdecf27007666..b23944bf30171 100644 --- a/crates/uv-configuration/src/extras.rs +++ b/crates/uv-configuration/src/extras.rs @@ -189,12 +189,12 @@ impl ExtrasSpecificationInner { /// Context about a [`ExtrasSpecification`][] that we've preserved for diagnostics #[derive(Debug, Default, Clone)] pub struct ExtrasSpecificationHistory { - pub extra: Vec, - pub only_extra: Vec, - pub no_extra: Vec, - pub all_extras: bool, - pub no_default_extras: bool, - pub defaults: DefaultExtras, + pub(crate) extra: Vec, + pub(crate) only_extra: Vec, + pub(crate) no_extra: Vec, + pub(crate) all_extras: bool, + pub(crate) no_default_extras: bool, + pub(crate) defaults: DefaultExtras, } impl ExtrasSpecificationHistory { diff --git a/crates/uv-configuration/src/install_options.rs b/crates/uv-configuration/src/install_options.rs index 964d4ed06ea27..75b16dc238b5e 100644 --- a/crates/uv-configuration/src/install_options.rs +++ b/crates/uv-configuration/src/install_options.rs @@ -16,21 +16,21 @@ pub struct InstallTarget<'a> { #[derive(Debug, Clone, Default)] pub struct InstallOptions { /// Omit the project itself from the resolution. - pub no_install_project: bool, + pub(crate) no_install_project: bool, /// Include only the project itself in the resolution. - pub only_install_project: bool, + pub(crate) only_install_project: bool, /// Omit all workspace members (including the project itself) from the resolution. - pub no_install_workspace: bool, + pub(crate) no_install_workspace: bool, /// Include only workspace members (including the project itself) in the resolution. - pub only_install_workspace: bool, + pub(crate) only_install_workspace: bool, /// Omit all local packages from the resolution. - pub no_install_local: bool, + pub(crate) no_install_local: bool, /// Include only local packages in the resolution. - pub only_install_local: bool, + pub(crate) only_install_local: bool, /// Omit the specified packages from the resolution. - pub no_install_package: Vec, + pub(crate) no_install_package: Vec, /// Include only the specified packages in the resolution. - pub only_install_package: Vec, + pub(crate) only_install_package: Vec, } impl InstallOptions { diff --git a/crates/uv-distribution-types/src/index.rs b/crates/uv-distribution-types/src/index.rs index e2031c0dd9048..36c6fe39a335b 100644 --- a/crates/uv-distribution-types/src/index.rs +++ b/crates/uv-distribution-types/src/index.rs @@ -21,10 +21,10 @@ use crate::{IndexStatusCodeStrategy, IndexUrl, IndexUrlError, SerializableStatus pub struct IndexCacheControl { /// Cache control header for Simple API requests. #[cfg_attr(feature = "schemars", schemars(with = "Option"))] - pub api: Option, + pub(crate) api: Option, /// Cache control header for file downloads. #[cfg_attr(feature = "schemars", schemars(with = "Option"))] - pub files: Option, + pub(crate) files: Option, } impl IndexCacheControl { diff --git a/crates/uv-distribution-types/src/installed.rs b/crates/uv-distribution-types/src/installed.rs index af14baa000767..f9d2615ea88b7 100644 --- a/crates/uv-distribution-types/src/installed.rs +++ b/crates/uv-distribution-types/src/installed.rs @@ -121,45 +121,45 @@ pub enum InstalledDistKind { pub struct InstalledRegistryDist { pub name: PackageName, pub version: Version, - pub path: Box, - pub cache_info: Option, - pub build_info: Option, + pub(crate) path: Box, + pub(crate) cache_info: Option, + pub(crate) build_info: Option, } #[derive(Debug, Clone, Hash, PartialEq, Eq)] pub struct InstalledDirectUrlDist { - pub name: PackageName, - pub version: Version, + pub(crate) name: PackageName, + pub(crate) version: Version, pub direct_url: Box, pub url: DisplaySafeUrl, pub editable: bool, - pub path: Box, + pub(crate) path: Box, pub cache_info: Option, - pub build_info: Option, + pub(crate) build_info: Option, } #[derive(Debug, Clone, Hash, PartialEq, Eq)] pub struct InstalledEggInfoFile { - pub name: PackageName, + pub(crate) name: PackageName, pub version: Version, - pub path: Box, + pub(crate) path: Box, } #[derive(Debug, Clone, Hash, PartialEq, Eq)] pub struct InstalledEggInfoDirectory { - pub name: PackageName, + pub(crate) name: PackageName, pub version: Version, - pub path: Box, + pub(crate) path: Box, } #[derive(Debug, Clone, Hash, PartialEq, Eq)] pub struct InstalledLegacyEditable { - pub name: PackageName, - pub version: Version, + pub(crate) name: PackageName, + pub(crate) version: Version, pub egg_link: Box, pub target: Box, - pub target_url: DisplaySafeUrl, - pub egg_info: Box, + pub(crate) target_url: DisplaySafeUrl, + pub(crate) egg_info: Box, } impl InstalledDist { diff --git a/crates/uv-distribution/src/metadata/build_requires.rs b/crates/uv-distribution/src/metadata/build_requires.rs index 7abbd2a161a5e..99be27bce2230 100644 --- a/crates/uv-distribution/src/metadata/build_requires.rs +++ b/crates/uv-distribution/src/metadata/build_requires.rs @@ -17,7 +17,7 @@ use crate::metadata::{LoweredRequirement, MetadataError}; /// Lowered requirements from a `[build-system.requires]` field in a `pyproject.toml` file. #[derive(Debug, Clone)] pub struct BuildRequires { - pub name: Option, + pub(crate) name: Option, pub requires_dist: Vec, } diff --git a/crates/uv-install-wheel/src/record.rs b/crates/uv-install-wheel/src/record.rs index 404cee5310c57..0e6dd98687a38 100644 --- a/crates/uv-install-wheel/src/record.rs +++ b/crates/uv-install-wheel/src/record.rs @@ -10,7 +10,7 @@ use serde::{Deserialize, Serialize}; #[derive(Deserialize, Serialize, PartialOrd, PartialEq, Ord, Eq)] pub struct RecordEntry { pub path: String, - pub hash: Option, + pub(crate) hash: Option, #[allow(dead_code)] - pub size: Option, + pub(crate) size: Option, } diff --git a/crates/uv-keyring/src/credential.rs b/crates/uv-keyring/src/credential.rs index 3622cff6099f4..f2df52ca12027 100644 --- a/crates/uv-keyring/src/credential.rs +++ b/crates/uv-keyring/src/credential.rs @@ -122,10 +122,6 @@ impl std::fmt::Debug for Credential { pub enum CredentialPersistence { /// Credentials vanish when the entry vanishes (stored in the entry) EntryOnly, - /// Credentials vanish when the process terminates (stored in process memory) - ProcessOnly, - /// Credentials persist until the machine reboots (stored in kernel memory) - UntilReboot, /// Credentials persist until they are explicitly deleted (stored on disk) UntilDelete, } diff --git a/crates/uv-keyring/src/macos.rs b/crates/uv-keyring/src/macos.rs index 6a7216e46b1c6..48bb4b08b4892 100644 --- a/crates/uv-keyring/src/macos.rs +++ b/crates/uv-keyring/src/macos.rs @@ -43,9 +43,9 @@ use security_framework::os::macos::passwords::find_generic_password; /// module to get at those attributes. #[derive(Debug, Clone, PartialEq, Eq)] pub struct MacCredential { - pub domain: MacKeychainDomain, - pub service: String, - pub account: String, + pub(crate) domain: MacKeychainDomain, + pub(crate) service: String, + pub(crate) account: String, } #[async_trait::async_trait] diff --git a/crates/uv-keyring/src/mock.rs b/crates/uv-keyring/src/mock.rs index ab41542d50717..88106dedc20e2 100644 --- a/crates/uv-keyring/src/mock.rs +++ b/crates/uv-keyring/src/mock.rs @@ -37,7 +37,7 @@ use crate::error::{Error, Result, decode_password}; /// The mutex is used to make sure these are Sync. #[derive(Debug)] pub struct MockCredential { - pub inner: Mutex>, + pub(crate) inner: Mutex>, } impl Default for MockCredential { @@ -57,8 +57,8 @@ impl Default for MockCredential { /// Most keystore implementation hide their internals.) #[derive(Debug, Default)] pub struct MockData { - pub secret: Option>, - pub error: Option, + pub(crate) secret: Option>, + pub(crate) error: Option, } #[async_trait::async_trait] diff --git a/crates/uv-logging/src/lib.rs b/crates/uv-logging/src/lib.rs index 1dce7c955a85c..8f8e747833dc6 100644 --- a/crates/uv-logging/src/lib.rs +++ b/crates/uv-logging/src/lib.rs @@ -10,9 +10,9 @@ use tracing_subscriber::registry::LookupSpan; /// The style of a uv logging line. pub struct UvFormat { - pub display_timestamp: bool, - pub display_level: bool, - pub show_spans: bool, + pub(crate) display_timestamp: bool, + pub(crate) display_level: bool, + pub(crate) show_spans: bool, } impl Default for UvFormat { diff --git a/crates/uv-netrc/src/netrc.rs b/crates/uv-netrc/src/netrc.rs index ef5d5c0e20571..fe72e903953ed 100644 --- a/crates/uv-netrc/src/netrc.rs +++ b/crates/uv-netrc/src/netrc.rs @@ -22,7 +22,7 @@ pub struct Authenticator { pub login: String, /// Supply an additional account password. - pub account: String, + pub(crate) account: String, /// Supply a password pub password: String, @@ -46,7 +46,7 @@ pub struct Netrc { pub hosts: HashMap, /// Dictionary mapping macro names to string lists. - pub macros: HashMap>, + pub(crate) macros: HashMap>, } impl std::fmt::Display for Netrc { diff --git a/crates/uv-pep440/src/version.rs b/crates/uv-pep440/src/version.rs index 5f727236d2bdb..9cf934c7bea5b 100644 --- a/crates/uv-pep440/src/version.rs +++ b/crates/uv-pep440/src/version.rs @@ -1681,9 +1681,9 @@ impl Deref for Release<'_> { #[cfg_attr(feature = "rkyv", rkyv(derive(Debug, Eq, PartialEq, PartialOrd, Ord)))] pub struct Prerelease { /// The kind of pre-release. - pub kind: PrereleaseKind, + pub(crate) kind: PrereleaseKind, /// The number associated with the pre-release. - pub number: u64, + pub(crate) number: u64, } /// Optional pre-release modifier (alpha, beta or release candidate) appended to version diff --git a/crates/uv-pep508/src/lib.rs b/crates/uv-pep508/src/lib.rs index 5b23ec9b27581..a625636c26045 100644 --- a/crates/uv-pep508/src/lib.rs +++ b/crates/uv-pep508/src/lib.rs @@ -63,11 +63,11 @@ pub struct Pep508Error { /// Either we have an error string from our parser or an upstream error from `url` pub message: Pep508ErrorSource, /// Span start index - pub start: usize, + pub(crate) start: usize, /// Span length - pub len: usize, + pub(crate) len: usize, /// The input string so we can print it underlined - pub input: String, + pub(crate) input: String, } /// Either we have an error string from our parser or an upstream error from `url` diff --git a/crates/uv-publish/src/lib.rs b/crates/uv-publish/src/lib.rs index f49f003ee94b4..cb5bfd24d4d9c 100644 --- a/crates/uv-publish/src/lib.rs +++ b/crates/uv-publish/src/lib.rs @@ -280,7 +280,7 @@ pub struct UploadDistribution { /// The parsed filename of the main distribution file. pub filename: DistFilename, /// Zero or more paths to PEP 740 attestations for the distribution. - pub attestations: Vec, + pub(crate) attestations: Vec, } /// Given a list of paths (which may contain globs), unroll them into diff --git a/crates/uv-pypi-types/src/direct_url.rs b/crates/uv-pypi-types/src/direct_url.rs index 9363be6f27e61..0067f52de569a 100644 --- a/crates/uv-pypi-types/src/direct_url.rs +++ b/crates/uv-pypi-types/src/direct_url.rs @@ -59,9 +59,9 @@ pub struct DirInfo { #[serde(rename_all = "snake_case")] pub struct ArchiveInfo { #[serde(skip_serializing_if = "Option::is_none")] - pub hash: Option, + pub(crate) hash: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub hashes: Option>, + pub(crate) hashes: Option>, } #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] diff --git a/crates/uv-python/src/discovery.rs b/crates/uv-python/src/discovery.rs index c473edebf7823..841df07d5fef5 100644 --- a/crates/uv-python/src/discovery.rs +++ b/crates/uv-python/src/discovery.rs @@ -216,9 +216,9 @@ type FindPythonResult = Result; /// See [`FindPythonResult`]. #[derive(Clone, Debug, Error)] pub struct PythonNotFound { - pub request: PythonRequest, - pub python_preference: PythonPreference, - pub environment_preference: EnvironmentPreference, + pub(crate) request: PythonRequest, + pub(crate) python_preference: PythonPreference, + pub(crate) environment_preference: EnvironmentPreference, } /// A location for discovery of a Python installation or interpreter. diff --git a/crates/uv-resolver/src/exclude_newer.rs b/crates/uv-resolver/src/exclude_newer.rs index 335a5f614a5b6..a547215577c25 100644 --- a/crates/uv-resolver/src/exclude_newer.rs +++ b/crates/uv-resolver/src/exclude_newer.rs @@ -192,8 +192,8 @@ impl serde::Serialize for ExcludeNewerValueWithSpanRef<'_> { #[derive(Debug, Clone, PartialEq, Eq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] pub struct ExcludeNewerPackageEntry { - pub package: PackageName, - pub setting: ExcludeNewerOverride, + pub(crate) package: PackageName, + pub(crate) setting: ExcludeNewerOverride, } impl FromStr for ExcludeNewerPackageEntry { diff --git a/crates/uv-resolver/src/options.rs b/crates/uv-resolver/src/options.rs index 239885fc198d3..bca280c371614 100644 --- a/crates/uv-resolver/src/options.rs +++ b/crates/uv-resolver/src/options.rs @@ -13,11 +13,11 @@ pub struct Options { pub dependency_mode: DependencyMode, pub fork_strategy: ForkStrategy, pub exclude_newer: ExcludeNewer, - pub index_strategy: IndexStrategy, - pub artifact_environments: SupportedEnvironments, - pub flexibility: Flexibility, + pub(crate) index_strategy: IndexStrategy, + pub(crate) artifact_environments: SupportedEnvironments, + pub(crate) flexibility: Flexibility, pub build_options: BuildOptions, - pub torch_backend: Option, + pub(crate) torch_backend: Option, } /// Builder for [`Options`]. diff --git a/crates/uv-scripts/src/lib.rs b/crates/uv-scripts/src/lib.rs index 88ea6b2dce266..db3e084c6aeaf 100644 --- a/crates/uv-scripts/src/lib.rs +++ b/crates/uv-scripts/src/lib.rs @@ -146,9 +146,9 @@ pub struct Pep723Script { /// The parsed [`Pep723Metadata`] table from the script. pub metadata: Pep723Metadata, /// The content of the script before the metadata table. - pub prelude: String, + pub(crate) prelude: String, /// The content of the script after the metadata table. - pub postlude: String, + pub(crate) postlude: String, } impl Pep723Script { diff --git a/crates/uv-settings/src/lib.rs b/crates/uv-settings/src/lib.rs index 4e1d5432c06da..2a1529b83307d 100644 --- a/crates/uv-settings/src/lib.rs +++ b/crates/uv-settings/src/lib.rs @@ -713,8 +713,8 @@ impl EnvFlag { /// the CLI level, however there are limited semantics in that context. #[derive(Debug, Clone)] pub struct EnvironmentOptions { - pub skip_wheel_filename_check: Option, - pub hide_build_output: Option, + pub(crate) skip_wheel_filename_check: Option, + pub(crate) hide_build_output: Option, pub python_install_bin: Option, pub python_install_registry: Option, pub python_no_registry: EnvFlag, @@ -755,8 +755,8 @@ pub struct EnvironmentOptions { pub venv_clear: EnvFlag, pub venv_relocatable: EnvFlag, pub init_bare: EnvFlag, - pub malware_check: EnvFlag, - pub malware_check_url: Option, + pub(crate) malware_check: EnvFlag, + pub(crate) malware_check_url: Option, } impl EnvironmentOptions { diff --git a/crates/uv-settings/src/settings.rs b/crates/uv-settings/src/settings.rs index fb3468a5e2c9d..19c658795b148 100644 --- a/crates/uv-settings/src/settings.rs +++ b/crates/uv-settings/src/settings.rs @@ -136,7 +136,7 @@ pub struct Options { cache-keys = [{ file = "pyproject.toml" }, { file = "requirements.txt" }, { git = { commit = true } }] "# )] - pub cache_keys: Option>, + pub(crate) cache_keys: Option>, // NOTE(charlie): These fields are shared with `ToolUv` in // `crates/uv-workspace/src/pyproject.rs`. The documentation lives on that struct. @@ -163,31 +163,31 @@ pub struct Options { // `crates/uv-workspace/src/pyproject.rs`. The documentation lives on that struct. // They're only respected in `pyproject.toml` files, and should be rejected in `uv.toml` files. #[cfg_attr(feature = "schemars", schemars(skip))] - pub conflicts: Option, + pub(crate) conflicts: Option, #[cfg_attr(feature = "schemars", schemars(skip))] - pub workspace: Option, + pub(crate) workspace: Option, #[cfg_attr(feature = "schemars", schemars(skip))] - pub sources: Option, + pub(crate) sources: Option, #[cfg_attr(feature = "schemars", schemars(skip))] - pub dev_dependencies: Option, + pub(crate) dev_dependencies: Option, #[cfg_attr(feature = "schemars", schemars(skip))] - pub default_groups: Option, + pub(crate) default_groups: Option, #[cfg_attr(feature = "schemars", schemars(skip))] - pub dependency_groups: Option, + pub(crate) dependency_groups: Option, #[cfg_attr(feature = "schemars", schemars(skip))] - pub managed: Option, + pub(crate) managed: Option, #[cfg_attr(feature = "schemars", schemars(skip))] - pub r#package: Option, + pub(crate) r#package: Option, #[cfg_attr(feature = "schemars", schemars(skip))] - pub build_backend: Option, + pub(crate) build_backend: Option, } impl Options { @@ -438,25 +438,25 @@ pub struct GlobalOptions { /// Settings relevant to all installer operations. #[derive(Debug, Clone, Default, CombineOptions)] pub struct InstallerOptions { - pub index: Option>, - pub index_url: Option, - pub extra_index_url: Option>, - pub no_index: Option, - pub find_links: Option>, - pub index_strategy: Option, - pub keyring_provider: Option, - pub config_settings: Option, - pub exclude_newer: Option, - pub link_mode: Option, - pub compile_bytecode: Option, - pub reinstall: Option, - pub build_isolation: Option, - pub no_build: Option, - pub no_build_package: Option>, - pub no_binary: Option, - pub no_binary_package: Option>, - pub no_sources: Option, - pub no_sources_package: Option>, + pub(crate) index: Option>, + pub(crate) index_url: Option, + pub(crate) extra_index_url: Option>, + pub(crate) no_index: Option, + pub(crate) find_links: Option>, + pub(crate) index_strategy: Option, + pub(crate) keyring_provider: Option, + pub(crate) config_settings: Option, + pub(crate) exclude_newer: Option, + pub(crate) link_mode: Option, + pub(crate) compile_bytecode: Option, + pub(crate) reinstall: Option, + pub(crate) build_isolation: Option, + pub(crate) no_build: Option, + pub(crate) no_build_package: Option>, + pub(crate) no_binary: Option, + pub(crate) no_binary_package: Option>, + pub(crate) no_sources: Option, + pub(crate) no_sources_package: Option>, } /// Settings relevant to all resolver operations. @@ -2140,68 +2140,68 @@ impl From for InstallerOptions { #[serde(deny_unknown_fields, rename_all = "kebab-case")] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] pub struct ToolOptions { - pub index: Option>, - pub index_url: Option, - pub extra_index_url: Option>, - pub no_index: Option, - pub find_links: Option>, - pub index_strategy: Option, - pub keyring_provider: Option, - pub resolution: Option, - pub prerelease: Option, - pub fork_strategy: Option, - pub dependency_metadata: Option>, - pub config_settings: Option, - pub config_settings_package: Option, - pub build_isolation: Option, - pub extra_build_dependencies: Option, - pub extra_build_variables: Option, - pub exclude_newer: Option, - pub exclude_newer_package: Option, - pub link_mode: Option, - pub compile_bytecode: Option, - pub no_sources: Option, - pub no_sources_package: Option>, - pub no_build: Option, - pub no_build_package: Option>, - pub no_binary: Option, - pub no_binary_package: Option>, - pub torch_backend: Option, + pub(crate) index: Option>, + pub(crate) index_url: Option, + pub(crate) extra_index_url: Option>, + pub(crate) no_index: Option, + pub(crate) find_links: Option>, + pub(crate) index_strategy: Option, + pub(crate) keyring_provider: Option, + pub(crate) resolution: Option, + pub(crate) prerelease: Option, + pub(crate) fork_strategy: Option, + pub(crate) dependency_metadata: Option>, + pub(crate) config_settings: Option, + pub(crate) config_settings_package: Option, + pub(crate) build_isolation: Option, + pub(crate) extra_build_dependencies: Option, + pub(crate) extra_build_variables: Option, + pub(crate) exclude_newer: Option, + pub(crate) exclude_newer_package: Option, + pub(crate) link_mode: Option, + pub(crate) compile_bytecode: Option, + pub(crate) no_sources: Option, + pub(crate) no_sources_package: Option>, + pub(crate) no_build: Option, + pub(crate) no_build_package: Option>, + pub(crate) no_binary: Option, + pub(crate) no_binary_package: Option>, + pub(crate) torch_backend: Option, } /// The on-disk representation of [`ToolOptions`] in a tool receipt. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(deny_unknown_fields, rename_all = "kebab-case")] pub struct ToolOptionsWire { - pub index: Option>, - pub index_url: Option, - pub extra_index_url: Option>, - pub no_index: Option, - pub find_links: Option>, - pub index_strategy: Option, - pub keyring_provider: Option, - pub resolution: Option, - pub prerelease: Option, - pub fork_strategy: Option, - pub dependency_metadata: Option>, - pub config_settings: Option, - pub config_settings_package: Option, - pub build_isolation: Option, - pub extra_build_dependencies: Option, - pub extra_build_variables: Option, - pub exclude_newer: Option, - pub exclude_newer_span: Option, + pub(crate) index: Option>, + pub(crate) index_url: Option, + pub(crate) extra_index_url: Option>, + pub(crate) no_index: Option, + pub(crate) find_links: Option>, + pub(crate) index_strategy: Option, + pub(crate) keyring_provider: Option, + pub(crate) resolution: Option, + pub(crate) prerelease: Option, + pub(crate) fork_strategy: Option, + pub(crate) dependency_metadata: Option>, + pub(crate) config_settings: Option, + pub(crate) config_settings_package: Option, + pub(crate) build_isolation: Option, + pub(crate) extra_build_dependencies: Option, + pub(crate) extra_build_variables: Option, + pub(crate) exclude_newer: Option, + pub(crate) exclude_newer_span: Option, #[serde(serialize_with = "serialize_exclude_newer_package_with_spans")] - pub exclude_newer_package: Option, - pub link_mode: Option, - pub compile_bytecode: Option, - pub no_sources: Option, - pub no_sources_package: Option>, - pub no_build: Option, - pub no_build_package: Option>, - pub no_binary: Option, - pub no_binary_package: Option>, - pub torch_backend: Option, + pub(crate) exclude_newer_package: Option, + pub(crate) link_mode: Option, + pub(crate) compile_bytecode: Option, + pub(crate) no_sources: Option, + pub(crate) no_sources_package: Option>, + pub(crate) no_build: Option, + pub(crate) no_build_package: Option>, + pub(crate) no_binary: Option, + pub(crate) no_binary_package: Option>, + pub(crate) torch_backend: Option, } impl From for ToolOptions { diff --git a/crates/uv-static/src/env_vars.rs b/crates/uv-static/src/env_vars.rs index 519b76ce0c1d4..ad3afb19c309c 100644 --- a/crates/uv-static/src/env_vars.rs +++ b/crates/uv-static/src/env_vars.rs @@ -490,7 +490,7 @@ impl EnvVars { /// [`UV_INSTALLER_GHE_BASE_URL`](Self::UV_INSTALLER_GHE_BASE_URL) override this /// variable for `uv self update`. #[attr_added_in("0.11.14")] - pub const UV_ASTRAL_MIRROR_URL: &'static str = "UV_ASTRAL_MIRROR_URL"; + pub(crate) const UV_ASTRAL_MIRROR_URL: &'static str = "UV_ASTRAL_MIRROR_URL"; /// Pin managed CPython versions to a specific build version. /// @@ -548,7 +548,7 @@ impl EnvVars { /// Use to update the json schema files. #[attr_hidden] #[attr_added_in("0.1.34")] - pub const UV_UPDATE_SCHEMA: &'static str = "UV_UPDATE_SCHEMA"; + pub(crate) const UV_UPDATE_SCHEMA: &'static str = "UV_UPDATE_SCHEMA"; /// Use to disable line wrapping for diagnostics. #[attr_added_in("0.0.5")] @@ -625,7 +625,7 @@ impl EnvVars { /// Used to set a temporary directory for some tests. #[attr_hidden] #[attr_added_in("0.3.4")] - pub const UV_INTERNAL__TEST_DIR: &'static str = "UV_INTERNAL__TEST_DIR"; + pub(crate) const UV_INTERNAL__TEST_DIR: &'static str = "UV_INTERNAL__TEST_DIR"; /// Path to a directory on a filesystem that supports copy-on-write, e.g., btrfs or APFS. /// @@ -656,7 +656,7 @@ impl EnvVars { /// When populated, uv will run additional tests that cover SMB-specific filesystem behavior. #[attr_hidden] #[attr_added_in("0.11.16")] - pub const UV_INTERNAL__TEST_SMB_FS: &'static str = "UV_INTERNAL__TEST_SMB_FS"; + pub(crate) const UV_INTERNAL__TEST_SMB_FS: &'static str = "UV_INTERNAL__TEST_SMB_FS"; /// Path to a directory on a filesystem with a low hardlink limit (e.g., minix with ~250). /// @@ -697,7 +697,7 @@ impl EnvVars { /// Path to cache directory on Unix systems. #[attr_added_in("0.1.17")] - pub const XDG_CACHE_HOME: &'static str = "XDG_CACHE_HOME"; + pub(crate) const XDG_CACHE_HOME: &'static str = "XDG_CACHE_HOME"; /// Path to directory for storing managed Python installations and tools. #[attr_added_in("0.2.16")] @@ -786,7 +786,7 @@ impl EnvVars { /// /// See [`PycInvalidationMode`](https://docs.python.org/3/library/py_compile.html#py_compile.PycInvalidationMode). #[attr_added_in("0.1.7")] - pub const PYC_INVALIDATION_MODE: &'static str = "PYC_INVALIDATION_MODE"; + pub(crate) const PYC_INVALIDATION_MODE: &'static str = "PYC_INVALIDATION_MODE"; /// Used to detect an activated virtual environment. #[attr_added_in("0.0.5")] @@ -811,7 +811,7 @@ impl EnvVars { /// If set to `1` before a virtual environment is activated, then the /// virtual environment name will not be prepended to the terminal prompt. #[attr_added_in("0.0.5")] - pub const VIRTUAL_ENV_DISABLE_PROMPT: &'static str = "VIRTUAL_ENV_DISABLE_PROMPT"; + pub(crate) const VIRTUAL_ENV_DISABLE_PROMPT: &'static str = "VIRTUAL_ENV_DISABLE_PROMPT"; /// Used to detect the use of the Windows Command Prompt (as opposed to PowerShell). #[attr_added_in("0.1.16")] @@ -896,11 +896,11 @@ impl EnvVars { /// The standard `PWD` posix env var. #[attr_added_in("0.0.5")] - pub const PWD: &'static str = "PWD"; + pub(crate) const PWD: &'static str = "PWD"; /// Used to look for Microsoft Store Pythons installations. #[attr_added_in("0.3.3")] - pub const LOCALAPPDATA: &'static str = "LOCALAPPDATA"; + pub(crate) const LOCALAPPDATA: &'static str = "LOCALAPPDATA"; /// Path to the `.git` directory. Ignored by `uv` when performing fetch. #[attr_hidden] @@ -942,7 +942,7 @@ impl EnvVars { /// Sets the SSH command used when Git tries to establish a connection using SSH. #[attr_hidden] #[attr_added_in("0.7.11")] - pub const GIT_SSH_COMMAND: &'static str = "GIT_SSH_COMMAND"; + pub(crate) const GIT_SSH_COMMAND: &'static str = "GIT_SSH_COMMAND"; /// Disable interactive git prompts in terminals, e.g., for credentials. Does not disable /// GUI prompts. @@ -990,17 +990,17 @@ impl EnvVars { /// `uv publish` may attempt trusted publishing flows when set /// to `true`. #[attr_added_in("0.8.18")] - pub const GITLAB_CI: &'static str = "GITLAB_CI"; + pub(crate) const GITLAB_CI: &'static str = "GITLAB_CI"; /// Used for testing GitLab CI trusted publishing. #[attr_hidden] #[attr_added_in("0.8.18")] - pub const PYPI_ID_TOKEN: &'static str = "PYPI_ID_TOKEN"; + pub(crate) const PYPI_ID_TOKEN: &'static str = "PYPI_ID_TOKEN"; /// Used for testing GitLab CI trusted publishing. #[attr_hidden] #[attr_added_in("0.8.18")] - pub const TESTPYPI_ID_TOKEN: &'static str = "TESTPYPI_ID_TOKEN"; + pub(crate) const TESTPYPI_ID_TOKEN: &'static str = "TESTPYPI_ID_TOKEN"; /// Sets the encoding for standard I/O streams (e.g., PYTHONIOENCODING=utf-8). #[attr_hidden] @@ -1019,17 +1019,17 @@ impl EnvVars { /// Adds directories to Python module search path (e.g., `PYTHONPATH=/path/to/modules`). #[attr_added_in("0.1.22")] - pub const PYTHONPATH: &'static str = "PYTHONPATH"; + pub(crate) const PYTHONPATH: &'static str = "PYTHONPATH"; /// Used to set the location of Python stdlib when using trampolines. #[attr_hidden] #[attr_added_in("0.7.13")] - pub const PYTHONHOME: &'static str = "PYTHONHOME"; + pub(crate) const PYTHONHOME: &'static str = "PYTHONHOME"; /// Used to correctly detect virtual environments when using trampolines. #[attr_hidden] #[attr_added_in("0.7.13")] - pub const PYVENV_LAUNCHER: &'static str = "__PYVENV_LAUNCHER__"; + pub(crate) const PYVENV_LAUNCHER: &'static str = "__PYVENV_LAUNCHER__"; /// Used in tests to enforce a consistent locale setting. #[attr_hidden] @@ -1058,7 +1058,7 @@ impl EnvVars { /// Use to set the .netrc file location. #[attr_added_in("0.1.16")] - pub const NETRC: &'static str = "NETRC"; + pub(crate) const NETRC: &'static str = "NETRC"; /// The standard `PAGER` posix env var. Used by `uv` to configure the appropriate pager. #[attr_added_in("0.4.18")] @@ -1149,7 +1149,7 @@ impl EnvVars { /// Specifies the directory where Cargo stores build artifacts (target directory). #[attr_hidden] #[attr_added_in("0.0.5")] - pub const CARGO_TARGET_DIR: &'static str = "CARGO_TARGET_DIR"; + pub(crate) const CARGO_TARGET_DIR: &'static str = "CARGO_TARGET_DIR"; /// Set by cargo when compiling for Windows-like platforms. #[attr_hidden] @@ -1164,39 +1164,39 @@ impl EnvVars { /// Used in tests for environment substitution testing in `requirements.in`. #[attr_hidden] #[attr_added_in("0.1.18")] - pub const URL: &'static str = "URL"; + pub(crate) const URL: &'static str = "URL"; /// Used in tests for environment substitution testing in `requirements.in`. #[attr_hidden] #[attr_added_in("0.1.18")] - pub const FILE_PATH: &'static str = "FILE_PATH"; + pub(crate) const FILE_PATH: &'static str = "FILE_PATH"; /// Used in tests for environment substitution testing in `requirements.in`. #[attr_hidden] #[attr_added_in("0.1.25")] - pub const HATCH_PATH: &'static str = "HATCH_PATH"; + pub(crate) const HATCH_PATH: &'static str = "HATCH_PATH"; /// Used in tests for environment substitution testing in `requirements.in`. #[attr_hidden] #[attr_added_in("0.1.25")] - pub const BLACK_PATH: &'static str = "BLACK_PATH"; + pub(crate) const BLACK_PATH: &'static str = "BLACK_PATH"; /// Used in testing Hatch's root.uri feature /// /// See: . #[attr_hidden] #[attr_added_in("0.1.22")] - pub const ROOT_PATH: &'static str = "ROOT_PATH"; + pub(crate) const ROOT_PATH: &'static str = "ROOT_PATH"; /// Used in testing extra build dependencies. #[attr_hidden] #[attr_added_in("0.8.5")] - pub const EXPECTED_ANYIO_VERSION: &'static str = "EXPECTED_ANYIO_VERSION"; + pub(crate) const EXPECTED_ANYIO_VERSION: &'static str = "EXPECTED_ANYIO_VERSION"; /// Used to set test credentials for keyring tests. #[attr_hidden] #[attr_added_in("0.1.34")] - pub const KEYRING_TEST_CREDENTIALS: &'static str = "KEYRING_TEST_CREDENTIALS"; + pub(crate) const KEYRING_TEST_CREDENTIALS: &'static str = "KEYRING_TEST_CREDENTIALS"; /// Used to disable delay for HTTP retries in tests. #[attr_added_in("0.7.21")] @@ -1210,12 +1210,12 @@ impl EnvVars { /// Used for testing named indexes in tests. #[attr_hidden] #[attr_added_in("0.5.21")] - pub const UV_INDEX_MY_INDEX_USERNAME: &'static str = "UV_INDEX_MY_INDEX_USERNAME"; + pub(crate) const UV_INDEX_MY_INDEX_USERNAME: &'static str = "UV_INDEX_MY_INDEX_USERNAME"; /// Used for testing named indexes in tests. #[attr_hidden] #[attr_added_in("0.5.21")] - pub const UV_INDEX_MY_INDEX_PASSWORD: &'static str = "UV_INDEX_MY_INDEX_PASSWORD"; + pub(crate) const UV_INDEX_MY_INDEX_PASSWORD: &'static str = "UV_INDEX_MY_INDEX_PASSWORD"; /// Used to set the GitHub fast-path url for tests. #[attr_hidden] @@ -1278,7 +1278,7 @@ impl EnvVars { /// Used ephemeral environments like CI to install uv to a specific path while preventing /// the installer from modifying shell profiles or environment variables. #[attr_added_in("0.5.0")] - pub const UV_UNMANAGED_INSTALL: &'static str = "UV_UNMANAGED_INSTALL"; + pub(crate) const UV_UNMANAGED_INSTALL: &'static str = "UV_UNMANAGED_INSTALL"; /// The URL from which to download uv using the standalone installer. By default, installs from /// uv's GitHub Releases. `INSTALLER_DOWNLOAD_URL` is also supported as an alias, for backwards @@ -1290,7 +1290,7 @@ impl EnvVars { /// installer and `self update` feature. `INSTALLER_NO_MODIFY_PATH` is also supported as an /// alias, for backwards compatibility. #[attr_added_in("0.8.4")] - pub const UV_NO_MODIFY_PATH: &'static str = "UV_NO_MODIFY_PATH"; + pub(crate) const UV_NO_MODIFY_PATH: &'static str = "UV_NO_MODIFY_PATH"; /// Skip writing `uv` installer metadata files (e.g., `INSTALLER`, `REQUESTED`, and `direct_url.json`) to site-packages `.dist-info` directories. #[attr_added_in("0.5.7")] @@ -1421,27 +1421,27 @@ impl EnvVars { /// The AWS access key ID to use when signing S3 requests. #[attr_added_in("0.8.21")] - pub const AWS_ACCESS_KEY_ID: &'static str = "AWS_ACCESS_KEY_ID"; + pub(crate) const AWS_ACCESS_KEY_ID: &'static str = "AWS_ACCESS_KEY_ID"; /// The AWS secret access key to use when signing S3 requests. #[attr_added_in("0.8.21")] - pub const AWS_SECRET_ACCESS_KEY: &'static str = "AWS_SECRET_ACCESS_KEY"; + pub(crate) const AWS_SECRET_ACCESS_KEY: &'static str = "AWS_SECRET_ACCESS_KEY"; /// The AWS session token to use when signing S3 requests. #[attr_added_in("0.8.21")] - pub const AWS_SESSION_TOKEN: &'static str = "AWS_SESSION_TOKEN"; + pub(crate) const AWS_SESSION_TOKEN: &'static str = "AWS_SESSION_TOKEN"; /// The AWS profile to use when signing S3 requests. #[attr_added_in("0.8.21")] - pub const AWS_PROFILE: &'static str = "AWS_PROFILE"; + pub(crate) const AWS_PROFILE: &'static str = "AWS_PROFILE"; /// The AWS config file to use when signing S3 requests. #[attr_added_in("0.8.21")] - pub const AWS_CONFIG_FILE: &'static str = "AWS_CONFIG_FILE"; + pub(crate) const AWS_CONFIG_FILE: &'static str = "AWS_CONFIG_FILE"; /// The AWS shared credentials file to use when signing S3 requests. #[attr_added_in("0.8.21")] - pub const AWS_SHARED_CREDENTIALS_FILE: &'static str = "AWS_SHARED_CREDENTIALS_FILE"; + pub(crate) const AWS_SHARED_CREDENTIALS_FILE: &'static str = "AWS_SHARED_CREDENTIALS_FILE"; /// Avoid verifying that wheel filenames match their contents when installing wheels. This /// is not recommended, as wheels with inconsistent filenames should be considered invalid and diff --git a/crates/uv-test/src/lib.rs b/crates/uv-test/src/lib.rs index c98078996a25a..28e56264b08da 100755 --- a/crates/uv-test/src/lib.rs +++ b/crates/uv-test/src/lib.rs @@ -141,21 +141,21 @@ pub const INSTA_FILTERS: &[(&str, &str)] = &[ /// * Set a shared test timestamp so snapshots don't change after a new release. /// * Set the venv to a fresh `.venv` in `temp_dir` pub struct TestContext { - pub root: ChildPath, - pub temp_dir: ChildPath, - pub cache_dir: ChildPath, - pub python_dir: ChildPath, - pub home_dir: ChildPath, - pub user_config_dir: ChildPath, - pub bin_dir: ChildPath, - pub venv: ChildPath, - pub workspace_root: PathBuf, + pub(crate) root: ChildPath, + pub(crate) temp_dir: ChildPath, + pub(crate) cache_dir: ChildPath, + pub(crate) python_dir: ChildPath, + pub(crate) home_dir: ChildPath, + pub(crate) user_config_dir: ChildPath, + pub(crate) bin_dir: ChildPath, + pub(crate) venv: ChildPath, + pub(crate) workspace_root: PathBuf, /// The Python version used for the virtual environment, if any. - pub python_version: Option, + pub(crate) python_version: Option, /// All the Python versions available during this test context. - pub python_versions: Vec<(PythonVersion, PathBuf)>, + pub(crate) python_versions: Vec<(PythonVersion, PathBuf)>, /// Path to the uv binary. uv_bin: PathBuf, diff --git a/crates/uv-trampoline-builder/src/lib.rs b/crates/uv-trampoline-builder/src/lib.rs index e43faaf2cf4fb..38fa03b0e1b67 100644 --- a/crates/uv-trampoline-builder/src/lib.rs +++ b/crates/uv-trampoline-builder/src/lib.rs @@ -47,7 +47,7 @@ const RESOURCE_SCRIPT_DATA: windows::core::PCWSTR = windows::core::w!("UV_SCRIPT pub struct Launcher { pub kind: LauncherKind, pub python_path: PathBuf, - pub script_data: Option>, + pub(crate) script_data: Option>, } impl Launcher { diff --git a/crates/uv-workspace/src/dependency_groups.rs b/crates/uv-workspace/src/dependency_groups.rs index d52fc22273f00..be167cc91306d 100644 --- a/crates/uv-workspace/src/dependency_groups.rs +++ b/crates/uv-workspace/src/dependency_groups.rs @@ -20,7 +20,7 @@ pub struct FlatDependencyGroups(BTreeMap); #[derive(Debug, Default, Clone)] pub struct FlatDependencyGroup { pub requirements: Vec>, - pub requires_python: Option, + pub(crate) requires_python: Option, } impl FlatDependencyGroups { diff --git a/crates/uv-workspace/src/pyproject.rs b/crates/uv-workspace/src/pyproject.rs index 4603be0ed83fc..445fe66317458 100644 --- a/crates/uv-workspace/src/pyproject.rs +++ b/crates/uv-workspace/src/pyproject.rs @@ -223,9 +223,9 @@ pub struct Project { /// The name of the project pub name: PackageName, /// The version of the project - pub version: Option, + pub(crate) version: Option, /// The Python versions this project is compatible with. - pub requires_python: Option, + pub(crate) requires_python: Option, /// The dependencies of the project. pub dependencies: Option>, /// The optional dependencies of the project. @@ -511,7 +511,7 @@ pub struct ToolUv { override-dependencies = ["werkzeug==2.3.0"] "# )] - pub override_dependencies: Option>>, + pub(crate) override_dependencies: Option>>, /// Dependencies to exclude when resolving the project's dependencies. /// @@ -542,7 +542,7 @@ pub struct ToolUv { exclude-dependencies = ["werkzeug"] "# )] - pub exclude_dependencies: Option>, + pub(crate) exclude_dependencies: Option>, /// Constraints to apply when resolving the project's dependencies. /// @@ -573,7 +573,7 @@ pub struct ToolUv { constraint-dependencies = ["grpcio<1.65"] "# )] - pub constraint_dependencies: Option>>, + pub(crate) constraint_dependencies: Option>>, /// Constraints to apply when solving build dependencies. /// @@ -604,7 +604,8 @@ pub struct ToolUv { build-constraint-dependencies = ["setuptools==60.0.0"] "# )] - pub build_constraint_dependencies: Option>>, + pub(crate) build_constraint_dependencies: + Option>>, /// A list of supported environments against which to resolve dependencies. /// From ad0eabd5e8735f5d101db580e39f3ea015149724 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Wed, 27 May 2026 00:14:05 +0200 Subject: [PATCH 09/11] Re-add TOML file --- hawk.toml | 1509 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1509 insertions(+) create mode 100644 hawk.toml diff --git a/hawk.toml b/hawk.toml new file mode 100644 index 0000000000000..70fa673863418 --- /dev/null +++ b/hawk.toml @@ -0,0 +1,1509 @@ +# Hawk analyzes the `uv` binary as a closed world; retain public API outside that graph. +# Keep each retained finding expected so removing it requires deleting this entry. + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_auth" +item = "cache::CredentialsCache::new" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_cache" +item = "Cache::temp" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_client" +item = "base_client::BaseClient::retry_policy" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_client" +item = "error::WrappedReqwestError::with_problem_details" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_dispatch" +item = "BuildDispatch::<'a>::with_build_extra_env_vars" +level = "expect" +reason = "retained library API outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_distribution_types" +item = "file::FileLocation::new" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_distribution_types" +item = "index_url::IndexUrl::parse" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_distribution_types" +item = "requires_python::RequiresPythonRange::upper" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_netrc" +item = "::from_file" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_options_metadata" +item = "OptionSet::record" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_platform" +item = "os::Os::from_env" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_preview" +item = "Preview::new" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_preview" +item = "Preview::all" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_pypi_types" +item = "conflicts::Conflicts::push" +level = "expect" +reason = "used by workspace tests or sibling products outside the selected binary graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "Entry::set_secret" +level = "expect" +reason = "used by the uv-keyring integration tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "Entry::get_secret" +level = "expect" +reason = "used by the uv-keyring integration tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "credential::nop_credential_builder" +level = "expect" +reason = "used by the fallback credential path on unsupported targets" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_netrc" +item = "netrc::Authenticator::new" +level = "expect" +reason = "used by uv-netrc unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_trampoline_builder" +item = "Launcher::write_to_file" +level = "expect" +target = "cfg(not(windows))" +reason = "used by the Windows uv command when analyzing a non-Windows target" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_trampoline_builder" +item = "Launcher::with_python_path" +level = "expect" +target = "cfg(not(windows))" +reason = "used by the Windows uv command when analyzing a non-Windows target" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "resolution::Resolution::is_empty" +level = "expect" +reason = "required companion to public Resolution::len" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_resolver" +item = "lock::Lock::is_empty" +level = "expect" +reason = "required companion to public Lock::len" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_resolver" +item = "resolution::output::ResolverOutput::is_empty" +level = "expect" +reason = "required companion to public ResolverOutput::len" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pep440" +item = "version::VersionPattern::verbatim" +level = "expect" +reason = "used by uv-pep508 unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pep440" +item = "version::VersionPattern::wildcard" +level = "expect" +reason = "used by uv-pep508 unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_fs" +item = "copy_dir_all" +level = "expect" +reason = "used by uv and uv-build-backend integration tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_fs" +item = "copy_atomic_sync" +level = "expect" +target = "cfg(not(unix))" +reason = "used by uv-install-wheel only when analyzing a Unix target" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_fs" +item = "with_retry_sync" +level = "expect" +target = "cfg(unix)" +reason = "used by uv-install-wheel only when analyzing a non-Unix target" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pypi_types" +item = "dependency_groups::DependencyGroups::get" +level = "expect" +reason = "used by uv-workspace unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pypi_types" +item = "dependency_groups::DependencyGroups::iter" +level = "expect" +reason = "required companion to IntoIterator for &DependencyGroups" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "base_client::BaseClientBuilder::<'a>::extra_middleware" +level = "expect" +reason = "supported public middleware extension API" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "registry_client::RegistryClientBuilder::<'a>::extra_middleware" +level = "expect" +reason = "supported public middleware extension API" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "registry_client::RegistryClientBuilder::<'a>::with_reqwest_client" +level = "expect" +reason = "supported public custom HTTP client API" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "base_client::BaseClientBuilder::<'a>::proxy" +level = "expect" +reason = "supported public proxy configuration API" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "registry_client::RegistryClientBuilder::<'a>::proxy" +level = "expect" +reason = "supported public proxy configuration API" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "base_client::BaseClientBuilder::<'a>::no_retry_delay" +level = "expect" +reason = "used by uv-client integration tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "base_client::RequestBuilder::<'a>::raw_builder" +level = "expect" +reason = "used by uv-publish unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "base_client::BaseClientBuilder::<'a>::with_system_certs" +level = "expect" +reason = "used by uv-client integration tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_workspace" +item = "workspace::ProjectWorkspace::discover" +level = "expect" +reason = "used by uv-distribution unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_resolver" +item = "exclude_newer::ExcludeNewer::global" +level = "expect" +reason = "used by uv-bench benchmarks" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "registry_client::RegistryClient::fetch_simple_index" +level = "expect" +reason = "used by the uv-dev package listing tool" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_options_metadata" +item = "OptionSet::documentation" +level = "expect" +reason = "used by uv-dev options reference generation" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_client" +item = "registry_client::SimpleIndexMetadata::iter" +level = "expect" +reason = "used by the uv-dev package listing tool" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "managed::platform_key_from_env" +level = "expect" +reason = "used by uv integration tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_auth" +item = "middleware::AuthMiddleware::with_cache" +level = "expect" +reason = "used by uv-auth unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_fastid" +item = "Id::secure" +level = "expect" +reason = "used by uv-fastid unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_installer" +item = "installer::Installer::<'a>::with_installer_name" +level = "expect" +reason = "used by uv-installer unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "downloads::ManagedPythonDownload::python_version" +level = "expect" +reason = "used by uv-python unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "managed::ManagedPythonInstallations::temp" +level = "expect" +reason = "used by uv-python unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "interpreter::Interpreter::pointer_size" +level = "expect" +target = "cfg(not(unix))" +reason = "used by uv-virtualenv only when analyzing a Unix target" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_python" +item = "pointer_size::PointerSize::is_64" +level = "expect" +target = "cfg(not(unix))" +reason = "used by uv-virtualenv only when analyzing a Unix target" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_distribution_types" +item = "index_url::IndexLocations::simple_api_cache_control_for" +level = "expect" +reason = "used by uv-distribution-types unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pep508" +item = "marker::tree::MarkerExpression::from_str" +level = "expect" +reason = "used by uv-pep508 unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_pep508" +item = "marker::tree::MarkerTree::simplify_not_extras" +level = "expect" +reason = "used by uv-pep508 unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "set_default_credential_builder" +level = "expect" +reason = "public mock credential API documented for tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "Entry::new_with_target" +level = "expect" +reason = "used by uv-keyring platform unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "Entry::new_with_credential" +level = "expect" +reason = "used by uv-keyring platform unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "Entry::get_attributes" +level = "expect" +reason = "used by uv-keyring platform unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "Entry::update_attributes" +level = "expect" +reason = "used by uv-keyring platform unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "Entry::get_credential" +level = "expect" +reason = "used by uv-keyring platform unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "macos::MacCredential::get_credential" +level = "expect" +target = "cfg(target_os = \"macos\")" +reason = "used by uv-keyring platform unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "windows::WinCredential::get_credential" +level = "expect" +target = "cfg(windows)" +reason = "used by uv-keyring platform unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "mock::MockCredential::set_error" +level = "expect" +reason = "used by uv-keyring mock unit tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_keyring" +item = "mock::default_credential_builder" +level = "expect" +reason = "public mock credential API documented for tests" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_windows" +item = "ctrl_handler::CtrlHandlerError::code" +level = "expect" +target = "cfg(windows)" +reason = "used by the uv-trampoline binary outside the selected uv graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_windows" +item = "job::JobError::code" +level = "expect" +target = "cfg(windows)" +reason = "used by the uv-trampoline binary outside the selected uv graph" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_windows" +item = "job::JobError::message" +level = "expect" +target = "cfg(windows)" +reason = "used by the uv-trampoline binary outside the selected uv graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_windows" +item = "job::Job::new" +level = "expect" +target = "cfg(windows)" +reason = "used by the uv-trampoline binary outside the selected uv graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_windows" +item = "job::Job::assign_process" +level = "expect" +target = "cfg(windows)" +reason = "used by the uv-trampoline binary outside the selected uv graph" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "PACKSE_VERSION" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "DEFAULT_PYTHON_VERSION" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "LATEST_PYTHON_3_15" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "LATEST_PYTHON_3_14" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "LATEST_PYTHON_3_13" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "LATEST_PYTHON_3_12" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "LATEST_PYTHON_3_11" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "LATEST_PYTHON_3_10" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "build_vendor_links_url" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "packse_index_url" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "INSTA_FILTERS" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::new_with_bin" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_exclude_newer" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_http_timeout" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_concurrent_installs" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_counts" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_cache_size" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_missing_file_error" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_exe_suffix" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_python_sources" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_python_names" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_virtualenv_bin" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_python_install_bin" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_pyvenv_cfg_filters" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_python_symlinks" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_path" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_link_mode_warning" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_not_executable" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_python_keys" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_latest_python_versions" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_windows_temp_dir" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_compiled_file_count" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filtered_current_version" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_cyclonedx_filters" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_collapsed_whitespace" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_python_download_cache" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_empty_python_install_mirror" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_managed_python_dirs" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_versions_as_managed" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_filter" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_unset_git_credential_helper" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::clear_filters" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_cache_on_cow_fs" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_cache_on_alt_fs" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_cache_on_lowlinks_fs" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_cache_on_nocow_fs" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_working_dir_on_cow_fs" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_working_dir_on_nocow_fs" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::test_bucket_dir" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::new_with_versions_and_bin" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::command" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::disallow_git_cli" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_git_lfs_config" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::add_shared_options" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::add_shared_args" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::add_shared_env" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_compile" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_sync" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_show" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_freeze" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_check" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_list" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::venv" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_install" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_uninstall" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_tree" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::pip_debug" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::help" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::init" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::sync" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::lock" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::audit" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::workspace_metadata" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::workspace_dir" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::workspace_list" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::export" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::format" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::build" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::version" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::self_version" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::self_update" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::publish" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_find" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_list" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_install" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_uninstall" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_upgrade" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_pin" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_dir" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::run" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::tool_run" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::tool_upgrade" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::tool_install" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::tool_list" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::tool_dir" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::tool_uninstall" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::add" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::remove" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::tree" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::clean" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::prune" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::cache_size" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::build_backend" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::interpreter" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_command" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::auth_login" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::auth_logout" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::auth_helper" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::auth_token" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::with_real_home" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::assert_command" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::assert_file" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::assert_installed" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::assert_not_installed" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::path_patterns" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_path" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::filters" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::filters_without_standard_filters" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::python_kind" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::site_packages" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::reset_venv" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::copy_ecosystem_project" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::diff_lock" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "TestContext::read" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "diff_snapshot" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "site_packages_path" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "venv_bin_path" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "get_python" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "create_venv_from_executable" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "python_path_with_versions" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "python_installations_for_versions" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "apply_filters" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "run_and_format" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "run_and_format_with_status" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "copy_dir_ignore" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "make_project" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "READ_ONLY_GITHUB_TOKEN" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "READ_ONLY_GITHUB_TOKEN_2" +level = "expect" +target = "cfg(not(windows))" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "READ_ONLY_GITHUB_SSH_DEPLOY_KEY" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "decode_token" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "download_to_disk" +level = "expect" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::dead_public" +crate = "uv_test" +item = "ReadOnlyDirectoryGuard::new" +level = "expect" +target = "cfg(unix)" +reason = "public API of the integration test support crate" + +[[override]] +lint = "hawk::unnecessary_public" +crate = "uv_distribution_types" +item = "config_settings::ConfigSettings::is_empty" +level = "expect" +reason = "kept public alongside the public len method" + From 9950336a671632d9011149dc00a2e17307006823 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Wed, 27 May 2026 12:36:43 +0200 Subject: [PATCH 10/11] Modify test targets --- crates/uv-auth/src/middleware.rs | 2 +- crates/uv-distribution-types/src/index_url.rs | 2 +- crates/uv-fastid/src/lib.rs | 2 +- crates/uv-installer/src/installer.rs | 2 +- crates/uv-keyring/src/lib.rs | 10 +- crates/uv-keyring/src/macos.rs | 2 +- crates/uv-keyring/src/mock.rs | 4 +- crates/uv-netrc/src/netrc.rs | 2 +- crates/uv-pep440/src/version.rs | 4 +- crates/uv-pep508/src/lib.rs | 8 +- crates/uv-pep508/src/marker/mod.rs | 3 +- crates/uv-pep508/src/marker/tree.rs | 4 +- crates/uv-python/src/downloads.rs | 2 +- crates/uv-python/src/lib.rs | 3 +- crates/uv-python/src/managed.rs | 2 +- crates/uv-static/src/env_vars.rs | 36 +- crates/uv-test/src/lib.rs | 42 +- hawk.toml | 1306 +---------------- 18 files changed, 71 insertions(+), 1365 deletions(-) diff --git a/crates/uv-auth/src/middleware.rs b/crates/uv-auth/src/middleware.rs index 44a82b7e5d000..28839a19cb096 100644 --- a/crates/uv-auth/src/middleware.rs +++ b/crates/uv-auth/src/middleware.rs @@ -271,7 +271,7 @@ impl AuthMiddleware { /// Configure the [`CredentialsCache`] to use. #[must_use] - pub fn with_cache(mut self, cache: CredentialsCache) -> Self { + pub(crate) fn with_cache(mut self, cache: CredentialsCache) -> Self { self.cache = Arc::new(cache); self } diff --git a/crates/uv-distribution-types/src/index_url.rs b/crates/uv-distribution-types/src/index_url.rs index ff2ef96a01b40..39f388852fae2 100644 --- a/crates/uv-distribution-types/src/index_url.rs +++ b/crates/uv-distribution-types/src/index_url.rs @@ -440,7 +440,7 @@ impl<'a> IndexLocations { } /// Return the Simple API cache control header for an [`IndexUrl`], if configured. - pub fn simple_api_cache_control_for(&self, url: &IndexUrl) -> Option { + pub(crate) fn simple_api_cache_control_for(&self, url: &IndexUrl) -> Option { for index in &self.indexes { if is_same_index(index.url(), url) { return index.simple_api_cache_control(); diff --git a/crates/uv-fastid/src/lib.rs b/crates/uv-fastid/src/lib.rs index d352767c08caa..4ed46e7d11f1d 100644 --- a/crates/uv-fastid/src/lib.rs +++ b/crates/uv-fastid/src/lib.rs @@ -83,7 +83,7 @@ impl Id { /// /// The resulting ID is suitable for use in contexts where uniqueness is needed and /// the risk of an adversarial collision is non-negligible. - pub fn secure() -> Self { + pub(crate) fn secure() -> Self { let mut raw = [0u8; 16]; let mut rng = rand::rng(); rng.fill_bytes(raw.as_mut()); diff --git a/crates/uv-installer/src/installer.rs b/crates/uv-installer/src/installer.rs index 50c42310e3756..6223e4ccb9993 100644 --- a/crates/uv-installer/src/installer.rs +++ b/crates/uv-installer/src/installer.rs @@ -66,7 +66,7 @@ impl<'a> Installer<'a> { /// Set the `installer_name` to something other than `"uv"`. #[must_use] - pub fn with_installer_name(self, installer_name: Option) -> Self { + pub(crate) fn with_installer_name(self, installer_name: Option) -> Self { Self { name: installer_name, ..self diff --git a/crates/uv-keyring/src/lib.rs b/crates/uv-keyring/src/lib.rs index 161463d8b747b..4d31827b194eb 100644 --- a/crates/uv-keyring/src/lib.rs +++ b/crates/uv-keyring/src/lib.rs @@ -278,13 +278,13 @@ impl Entry { /// Create an entry for the given target, service, and user. /// /// The default credential builder is used. - pub fn new_with_target(target: &str, service: &str, user: &str) -> Result { + pub(crate) fn new_with_target(target: &str, service: &str, user: &str) -> Result { let entry = build_default_credential(Some(target), service, user)?; Ok(entry) } /// Create an entry from a credential that may be in any credential store. - pub fn new_with_credential(credential: Box) -> Self { + pub(crate) fn new_with_credential(credential: Box) -> Self { Self { inner: credential } } @@ -349,7 +349,7 @@ impl Entry { /// that matches this entry. This can only happen /// on some platforms, and then only if a third-party /// application wrote the ambiguous credential. - pub async fn get_attributes(&self) -> Result> { + pub(crate) async fn get_attributes(&self) -> Result> { self.inner.get_attributes().await } @@ -368,7 +368,7 @@ impl Entry { /// that matches this entry. This can only happen /// on some platforms, and then only if a third-party /// application wrote the ambiguous credential. - pub async fn update_attributes(&self, attributes: &HashMap<&str, &str>) -> Result<()> { + pub(crate) async fn update_attributes(&self, attributes: &HashMap<&str, &str>) -> Result<()> { self.inner.update_attributes(attributes).await } @@ -394,7 +394,7 @@ impl Entry { /// The reference is of the [Any](std::any::Any) type, so it can be /// downgraded to a concrete credential object. The client must know /// what type of concrete object to cast to. - pub fn get_credential(&self) -> &dyn std::any::Any { + pub(crate) fn get_credential(&self) -> &dyn std::any::Any { self.inner.as_any() } } diff --git a/crates/uv-keyring/src/macos.rs b/crates/uv-keyring/src/macos.rs index 48bb4b08b4892..f5d6e8303461d 100644 --- a/crates/uv-keyring/src/macos.rs +++ b/crates/uv-keyring/src/macos.rs @@ -166,7 +166,7 @@ impl MacCredential { /// On Mac, this is basically a no-op, because we represent any attributes /// other than the ones we use to find the generic credential. /// But at least this checks whether the underlying credential exists. - pub async fn get_credential(&self) -> Result { + pub(crate) async fn get_credential(&self) -> Result { let service = self.service.clone(); let account = self.account.clone(); let domain = self.domain; diff --git a/crates/uv-keyring/src/mock.rs b/crates/uv-keyring/src/mock.rs index 88106dedc20e2..b3c55e2b9ffe8 100644 --- a/crates/uv-keyring/src/mock.rs +++ b/crates/uv-keyring/src/mock.rs @@ -186,7 +186,7 @@ impl MockCredential { /// Error returns always take precedence over the normal /// behavior of the mock. But once an error has been /// returned it is removed, so the mock works thereafter. - pub fn set_error(&self, err: Error) { + pub(crate) fn set_error(&self, err: Error) { let mut inner = self .inner .lock() @@ -221,7 +221,7 @@ impl CredentialBuilderApi for MockCredentialBuilder { } /// Return a mock credential builder for use by clients. -pub fn default_credential_builder() -> Box { +pub(crate) fn default_credential_builder() -> Box { Box::new(MockCredentialBuilder {}) } diff --git a/crates/uv-netrc/src/netrc.rs b/crates/uv-netrc/src/netrc.rs index fe72e903953ed..3d697b07ddfe7 100644 --- a/crates/uv-netrc/src/netrc.rs +++ b/crates/uv-netrc/src/netrc.rs @@ -30,7 +30,7 @@ pub struct Authenticator { impl Authenticator { #[allow(dead_code)] - pub fn new(login: &str, account: &str, password: &str) -> Self { + pub(crate) fn new(login: &str, account: &str, password: &str) -> Self { Self { login: login.to_owned(), account: account.to_owned(), diff --git a/crates/uv-pep440/src/version.rs b/crates/uv-pep440/src/version.rs index 9cf934c7bea5b..5f727236d2bdb 100644 --- a/crates/uv-pep440/src/version.rs +++ b/crates/uv-pep440/src/version.rs @@ -1681,9 +1681,9 @@ impl Deref for Release<'_> { #[cfg_attr(feature = "rkyv", rkyv(derive(Debug, Eq, PartialEq, PartialOrd, Ord)))] pub struct Prerelease { /// The kind of pre-release. - pub(crate) kind: PrereleaseKind, + pub kind: PrereleaseKind, /// The number associated with the pre-release. - pub(crate) number: u64, + pub number: u64, } /// Optional pre-release modifier (alpha, beta or release candidate) appended to version diff --git a/crates/uv-pep508/src/lib.rs b/crates/uv-pep508/src/lib.rs index a625636c26045..1df9369dd7cc4 100644 --- a/crates/uv-pep508/src/lib.rs +++ b/crates/uv-pep508/src/lib.rs @@ -34,11 +34,11 @@ use crate::cursor::Cursor; pub use crate::marker::{ CanonicalMarkerValueExtra, CanonicalMarkerValueString, CanonicalMarkerValueVersion, ContainsMarkerTree, ExtraMarkerTree, ExtraOperator, InMarkerTree, MarkerEnvironment, - MarkerExpression, MarkerOperator, MarkerTree, MarkerTreeContents, MarkerTreeKind, - MarkerValueExtra, MarkerValueList, MarkerValueString, MarkerValueVersion, StringMarkerTree, - StringVersion, VersionMarkerTree, + MarkerEnvironmentBuilder, MarkerExpression, MarkerOperator, MarkerTree, MarkerTreeContents, + MarkerTreeKind, MarkerValueExtra, MarkerValueList, MarkerValueString, MarkerValueVersion, + StringMarkerTree, StringVersion, VersionMarkerTree, }; -pub(crate) use crate::marker::{MarkerEnvironmentBuilder, MarkerValue, MarkerWarningKind}; +pub(crate) use crate::marker::{MarkerValue, MarkerWarningKind}; pub use crate::origin::RequirementOrigin; #[cfg(feature = "non-pep508-extensions")] pub use crate::unnamed::{UnnamedRequirement, UnnamedRequirementUrl}; diff --git a/crates/uv-pep508/src/marker/mod.rs b/crates/uv-pep508/src/marker/mod.rs index a33103f41fe23..aad68cf78ffc2 100644 --- a/crates/uv-pep508/src/marker/mod.rs +++ b/crates/uv-pep508/src/marker/mod.rs @@ -16,8 +16,7 @@ pub(crate) mod parse; mod simplify; mod tree; -pub use environment::MarkerEnvironment; -pub(crate) use environment::MarkerEnvironmentBuilder; +pub use environment::{MarkerEnvironment, MarkerEnvironmentBuilder}; pub use lowering::{ CanonicalMarkerValueExtra, CanonicalMarkerValueString, CanonicalMarkerValueVersion, }; diff --git a/crates/uv-pep508/src/marker/tree.rs b/crates/uv-pep508/src/marker/tree.rs index 116acd4b42bc0..469db3f65869d 100644 --- a/crates/uv-pep508/src/marker/tree.rs +++ b/crates/uv-pep508/src/marker/tree.rs @@ -655,7 +655,7 @@ impl MarkerExpression { /// Returns `None` if the expression consists entirely of meaningless expressions /// that are ignored, such as `os_name ~= 'foo'`. #[expect(clippy::should_implement_trait)] - pub fn from_str(s: &str) -> Result, Pep508Error> { + pub(crate) fn from_str(s: &str) -> Result, Pep508Error> { Self::parse_reporter(s, &mut TracingReporter) } @@ -1309,7 +1309,7 @@ impl MarkerTree { /// == 'linux' and extra != 'dev'`, the marker will be simplified to /// `sys_platform == 'linux'`. #[must_use] - pub fn simplify_not_extras(self, extras: &[ExtraName]) -> Self { + pub(crate) fn simplify_not_extras(self, extras: &[ExtraName]) -> Self { self.simplify_not_extras_with(|name| extras.contains(name)) } diff --git a/crates/uv-python/src/downloads.rs b/crates/uv-python/src/downloads.rs index 6e46e3abbf15b..f08ed5be10583 100644 --- a/crates/uv-python/src/downloads.rs +++ b/crates/uv-python/src/downloads.rs @@ -1443,7 +1443,7 @@ impl ManagedPythonDownload { Ok(()) } - pub fn python_version(&self) -> PythonVersion { + pub(crate) fn python_version(&self) -> PythonVersion { self.key.version() } diff --git a/crates/uv-python/src/lib.rs b/crates/uv-python/src/lib.rs index 77e4ca79e8624..959dd31af7e79 100644 --- a/crates/uv-python/src/lib.rs +++ b/crates/uv-python/src/lib.rs @@ -22,10 +22,9 @@ pub use crate::pointer_size::PointerSize; pub use crate::prefix::Prefix; pub use crate::python_version::{BuildVersionError, PythonVersion}; pub use crate::target::Target; -pub(crate) use crate::version_files::PYTHON_VERSIONS_FILENAME; pub use crate::version_files::{ DiscoveryOptions as VersionFileDiscoveryOptions, FilePreference as VersionFilePreference, - PYTHON_VERSION_FILENAME, PythonVersionFile, + PYTHON_VERSION_FILENAME, PYTHON_VERSIONS_FILENAME, PythonVersionFile, }; pub use crate::virtualenv::{Error as VirtualEnvError, PyVenvConfiguration, VirtualEnvironment}; diff --git a/crates/uv-python/src/managed.rs b/crates/uv-python/src/managed.rs index ba3103dcf5490..63ea459b0090f 100644 --- a/crates/uv-python/src/managed.rs +++ b/crates/uv-python/src/managed.rs @@ -139,7 +139,7 @@ impl ManagedPythonInstallations { } /// Create a temporary Python installation directory. - pub fn temp() -> Result { + pub(crate) fn temp() -> Result { Ok(Self::from_path( StateStore::temp()?.bucket(StateBucket::ManagedPython), )) diff --git a/crates/uv-static/src/env_vars.rs b/crates/uv-static/src/env_vars.rs index ad3afb19c309c..b28299504c255 100644 --- a/crates/uv-static/src/env_vars.rs +++ b/crates/uv-static/src/env_vars.rs @@ -548,7 +548,7 @@ impl EnvVars { /// Use to update the json schema files. #[attr_hidden] #[attr_added_in("0.1.34")] - pub(crate) const UV_UPDATE_SCHEMA: &'static str = "UV_UPDATE_SCHEMA"; + pub const UV_UPDATE_SCHEMA: &'static str = "UV_UPDATE_SCHEMA"; /// Use to disable line wrapping for diagnostics. #[attr_added_in("0.0.5")] @@ -896,7 +896,7 @@ impl EnvVars { /// The standard `PWD` posix env var. #[attr_added_in("0.0.5")] - pub(crate) const PWD: &'static str = "PWD"; + pub const PWD: &'static str = "PWD"; /// Used to look for Microsoft Store Pythons installations. #[attr_added_in("0.3.3")] @@ -942,7 +942,7 @@ impl EnvVars { /// Sets the SSH command used when Git tries to establish a connection using SSH. #[attr_hidden] #[attr_added_in("0.7.11")] - pub(crate) const GIT_SSH_COMMAND: &'static str = "GIT_SSH_COMMAND"; + pub const GIT_SSH_COMMAND: &'static str = "GIT_SSH_COMMAND"; /// Disable interactive git prompts in terminals, e.g., for credentials. Does not disable /// GUI prompts. @@ -990,17 +990,17 @@ impl EnvVars { /// `uv publish` may attempt trusted publishing flows when set /// to `true`. #[attr_added_in("0.8.18")] - pub(crate) const GITLAB_CI: &'static str = "GITLAB_CI"; + pub const GITLAB_CI: &'static str = "GITLAB_CI"; /// Used for testing GitLab CI trusted publishing. #[attr_hidden] #[attr_added_in("0.8.18")] - pub(crate) const PYPI_ID_TOKEN: &'static str = "PYPI_ID_TOKEN"; + pub const PYPI_ID_TOKEN: &'static str = "PYPI_ID_TOKEN"; /// Used for testing GitLab CI trusted publishing. #[attr_hidden] #[attr_added_in("0.8.18")] - pub(crate) const TESTPYPI_ID_TOKEN: &'static str = "TESTPYPI_ID_TOKEN"; + pub const TESTPYPI_ID_TOKEN: &'static str = "TESTPYPI_ID_TOKEN"; /// Sets the encoding for standard I/O streams (e.g., PYTHONIOENCODING=utf-8). #[attr_hidden] @@ -1019,7 +1019,7 @@ impl EnvVars { /// Adds directories to Python module search path (e.g., `PYTHONPATH=/path/to/modules`). #[attr_added_in("0.1.22")] - pub(crate) const PYTHONPATH: &'static str = "PYTHONPATH"; + pub const PYTHONPATH: &'static str = "PYTHONPATH"; /// Used to set the location of Python stdlib when using trampolines. #[attr_hidden] @@ -1058,7 +1058,7 @@ impl EnvVars { /// Use to set the .netrc file location. #[attr_added_in("0.1.16")] - pub(crate) const NETRC: &'static str = "NETRC"; + pub const NETRC: &'static str = "NETRC"; /// The standard `PAGER` posix env var. Used by `uv` to configure the appropriate pager. #[attr_added_in("0.4.18")] @@ -1149,7 +1149,7 @@ impl EnvVars { /// Specifies the directory where Cargo stores build artifacts (target directory). #[attr_hidden] #[attr_added_in("0.0.5")] - pub(crate) const CARGO_TARGET_DIR: &'static str = "CARGO_TARGET_DIR"; + pub const CARGO_TARGET_DIR: &'static str = "CARGO_TARGET_DIR"; /// Set by cargo when compiling for Windows-like platforms. #[attr_hidden] @@ -1164,39 +1164,39 @@ impl EnvVars { /// Used in tests for environment substitution testing in `requirements.in`. #[attr_hidden] #[attr_added_in("0.1.18")] - pub(crate) const URL: &'static str = "URL"; + pub const URL: &'static str = "URL"; /// Used in tests for environment substitution testing in `requirements.in`. #[attr_hidden] #[attr_added_in("0.1.18")] - pub(crate) const FILE_PATH: &'static str = "FILE_PATH"; + pub const FILE_PATH: &'static str = "FILE_PATH"; /// Used in tests for environment substitution testing in `requirements.in`. #[attr_hidden] #[attr_added_in("0.1.25")] - pub(crate) const HATCH_PATH: &'static str = "HATCH_PATH"; + pub const HATCH_PATH: &'static str = "HATCH_PATH"; /// Used in tests for environment substitution testing in `requirements.in`. #[attr_hidden] #[attr_added_in("0.1.25")] - pub(crate) const BLACK_PATH: &'static str = "BLACK_PATH"; + pub const BLACK_PATH: &'static str = "BLACK_PATH"; /// Used in testing Hatch's root.uri feature /// /// See: . #[attr_hidden] #[attr_added_in("0.1.22")] - pub(crate) const ROOT_PATH: &'static str = "ROOT_PATH"; + pub const ROOT_PATH: &'static str = "ROOT_PATH"; /// Used in testing extra build dependencies. #[attr_hidden] #[attr_added_in("0.8.5")] - pub(crate) const EXPECTED_ANYIO_VERSION: &'static str = "EXPECTED_ANYIO_VERSION"; + pub const EXPECTED_ANYIO_VERSION: &'static str = "EXPECTED_ANYIO_VERSION"; /// Used to set test credentials for keyring tests. #[attr_hidden] #[attr_added_in("0.1.34")] - pub(crate) const KEYRING_TEST_CREDENTIALS: &'static str = "KEYRING_TEST_CREDENTIALS"; + pub const KEYRING_TEST_CREDENTIALS: &'static str = "KEYRING_TEST_CREDENTIALS"; /// Used to disable delay for HTTP retries in tests. #[attr_added_in("0.7.21")] @@ -1210,12 +1210,12 @@ impl EnvVars { /// Used for testing named indexes in tests. #[attr_hidden] #[attr_added_in("0.5.21")] - pub(crate) const UV_INDEX_MY_INDEX_USERNAME: &'static str = "UV_INDEX_MY_INDEX_USERNAME"; + pub const UV_INDEX_MY_INDEX_USERNAME: &'static str = "UV_INDEX_MY_INDEX_USERNAME"; /// Used for testing named indexes in tests. #[attr_hidden] #[attr_added_in("0.5.21")] - pub(crate) const UV_INDEX_MY_INDEX_PASSWORD: &'static str = "UV_INDEX_MY_INDEX_PASSWORD"; + pub const UV_INDEX_MY_INDEX_PASSWORD: &'static str = "UV_INDEX_MY_INDEX_PASSWORD"; /// Used to set the GitHub fast-path url for tests. #[attr_hidden] diff --git a/crates/uv-test/src/lib.rs b/crates/uv-test/src/lib.rs index 28e56264b08da..b61495deeeea0 100755 --- a/crates/uv-test/src/lib.rs +++ b/crates/uv-test/src/lib.rs @@ -36,16 +36,16 @@ use uv_static::EnvVars; // Shared test timestamp for deterministic package availability and relative times. static TEST_TIMESTAMP: &str = "2024-03-25T00:00:00Z"; -pub const PACKSE_VERSION: &str = "0.3.59"; +pub(crate) const PACKSE_VERSION: &str = "0.3.59"; pub const DEFAULT_PYTHON_VERSION: &str = "3.12"; // The expected latest patch version for each Python minor version. -pub const LATEST_PYTHON_3_15: &str = "3.15.0b1"; -pub const LATEST_PYTHON_3_14: &str = "3.14.5"; -pub const LATEST_PYTHON_3_13: &str = "3.13.13"; +pub(crate) const LATEST_PYTHON_3_15: &str = "3.15.0b1"; +pub(crate) const LATEST_PYTHON_3_14: &str = "3.14.5"; +pub(crate) const LATEST_PYTHON_3_13: &str = "3.13.13"; pub const LATEST_PYTHON_3_12: &str = "3.12.13"; -pub const LATEST_PYTHON_3_11: &str = "3.11.15"; -pub const LATEST_PYTHON_3_10: &str = "3.10.20"; +pub(crate) const LATEST_PYTHON_3_11: &str = "3.11.15"; +pub(crate) const LATEST_PYTHON_3_10: &str = "3.10.20"; /// Using a find links url allows using `--index-url` instead of `--extra-index-url` in tests /// to prevent dependency confusion attacks against our test suite. @@ -141,21 +141,21 @@ pub const INSTA_FILTERS: &[(&str, &str)] = &[ /// * Set a shared test timestamp so snapshots don't change after a new release. /// * Set the venv to a fresh `.venv` in `temp_dir` pub struct TestContext { - pub(crate) root: ChildPath, - pub(crate) temp_dir: ChildPath, - pub(crate) cache_dir: ChildPath, + pub root: ChildPath, + pub temp_dir: ChildPath, + pub cache_dir: ChildPath, pub(crate) python_dir: ChildPath, - pub(crate) home_dir: ChildPath, - pub(crate) user_config_dir: ChildPath, - pub(crate) bin_dir: ChildPath, - pub(crate) venv: ChildPath, - pub(crate) workspace_root: PathBuf, + pub home_dir: ChildPath, + pub user_config_dir: ChildPath, + pub bin_dir: ChildPath, + pub venv: ChildPath, + pub workspace_root: PathBuf, /// The Python version used for the virtual environment, if any. pub(crate) python_version: Option, /// All the Python versions available during this test context. - pub(crate) python_versions: Vec<(PythonVersion, PathBuf)>, + pub python_versions: Vec<(PythonVersion, PathBuf)>, /// Path to the uv binary. uv_bin: PathBuf, @@ -1179,7 +1179,7 @@ impl TestContext { } /// Only the arguments of [`TestContext::add_shared_options`]. - pub fn add_shared_args(&self, command: &mut Command) { + pub(crate) fn add_shared_args(&self, command: &mut Command) { command.arg("--cache-dir").arg(self.cache_dir.path()); } @@ -1842,7 +1842,7 @@ impl TestContext { } /// For when we add pypy to the test suite. - pub fn python_kind(&self) -> &'static str { + pub(crate) fn python_kind(&self) -> &'static str { "python" } @@ -2018,7 +2018,7 @@ pub fn venv_bin_path(venv: impl AsRef) -> PathBuf { } /// Get the path to the python interpreter for a specific python version. -pub fn get_python(version: &PythonVersion) -> PathBuf { +pub(crate) fn get_python(version: &PythonVersion) -> PathBuf { ManagedPythonInstallations::from_settings(None) .map(|installed_pythons| { installed_pythons @@ -2035,7 +2035,7 @@ pub fn get_python(version: &PythonVersion) -> PathBuf { } /// Create a virtual environment at the given path. -pub fn create_venv_from_executable>( +pub(crate) fn create_venv_from_executable>( path: P, cache_dir: &ChildPath, python: &Path, @@ -2073,7 +2073,7 @@ pub fn python_path_with_versions( /// Returns a list of Python executables for the given versions. /// /// Generally this should be used with `UV_PYTHON_SEARCH_PATH`. -pub fn python_installations_for_versions( +pub(crate) fn python_installations_for_versions( temp_dir: &ChildPath, python_versions: &[&str], download_list: &ManagedPythonDownloadList, @@ -2144,7 +2144,7 @@ pub fn run_and_format>( /// /// This function is derived from `insta_cmd`s `spawn_with_info`. #[expect(clippy::print_stderr)] -pub fn run_and_format_with_status>( +pub(crate) fn run_and_format_with_status>( mut command: impl BorrowMut, filters: impl AsRef<[(T, T)]>, function_name: &str, diff --git a/hawk.toml b/hawk.toml index 70fa673863418..36da54207eb8e 100644 --- a/hawk.toml +++ b/hawk.toml @@ -1,34 +1,6 @@ -# Hawk analyzes the `uv` binary as a closed world; retain public API outside that graph. +# Hawk analyzes the `uv` binary and workspace tests as a closed world; retain public API outside those graphs. # Keep each retained finding expected so removing it requires deleting this entry. -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_auth" -item = "cache::CredentialsCache::new" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_cache" -item = "Cache::temp" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_client" -item = "base_client::BaseClient::retry_policy" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_client" -item = "error::WrappedReqwestError::with_problem_details" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - [[override]] lint = "hawk::dead_public" crate = "uv_dispatch" @@ -36,83 +8,6 @@ item = "BuildDispatch::<'a>::with_build_extra_env_vars" level = "expect" reason = "retained library API outside the selected binary graph" -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_distribution_types" -item = "file::FileLocation::new" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_distribution_types" -item = "index_url::IndexUrl::parse" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_distribution_types" -item = "requires_python::RequiresPythonRange::upper" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_netrc" -item = "::from_file" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_options_metadata" -item = "OptionSet::record" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_platform" -item = "os::Os::from_env" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_preview" -item = "Preview::new" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_preview" -item = "Preview::all" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_pypi_types" -item = "conflicts::Conflicts::push" -level = "expect" -reason = "used by workspace tests or sibling products outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::set_secret" -level = "expect" -reason = "used by the uv-keyring integration tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::get_secret" -level = "expect" -reason = "used by the uv-keyring integration tests" - [[override]] lint = "hawk::dead_public" crate = "uv_keyring" @@ -120,13 +15,6 @@ item = "credential::nop_credential_builder" level = "expect" reason = "used by the fallback credential path on unsupported targets" -[[override]] -lint = "hawk::dead_public" -crate = "uv_netrc" -item = "netrc::Authenticator::new" -level = "expect" -reason = "used by uv-netrc unit tests" - [[override]] lint = "hawk::dead_public" crate = "uv_trampoline_builder" @@ -164,27 +52,6 @@ item = "resolution::output::ResolverOutput::is_empty" level = "expect" reason = "required companion to public ResolverOutput::len" -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep440" -item = "version::VersionPattern::verbatim" -level = "expect" -reason = "used by uv-pep508 unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep440" -item = "version::VersionPattern::wildcard" -level = "expect" -reason = "used by uv-pep508 unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_fs" -item = "copy_dir_all" -level = "expect" -reason = "used by uv and uv-build-backend integration tests" - [[override]] lint = "hawk::dead_public" crate = "uv_fs" @@ -201,13 +68,6 @@ level = "expect" target = "cfg(unix)" reason = "used by uv-install-wheel only when analyzing a non-Unix target" -[[override]] -lint = "hawk::dead_public" -crate = "uv_pypi_types" -item = "dependency_groups::DependencyGroups::get" -level = "expect" -reason = "used by uv-workspace unit tests" - [[override]] lint = "hawk::dead_public" crate = "uv_pypi_types" @@ -250,34 +110,6 @@ item = "registry_client::RegistryClientBuilder::<'a>::proxy" level = "expect" reason = "supported public proxy configuration API" -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::BaseClientBuilder::<'a>::no_retry_delay" -level = "expect" -reason = "used by uv-client integration tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::RequestBuilder::<'a>::raw_builder" -level = "expect" -reason = "used by uv-publish unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::BaseClientBuilder::<'a>::with_system_certs" -level = "expect" -reason = "used by uv-client integration tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_workspace" -item = "workspace::ProjectWorkspace::discover" -level = "expect" -reason = "used by uv-distribution unit tests" - [[override]] lint = "hawk::dead_public" crate = "uv_resolver" @@ -285,69 +117,6 @@ item = "exclude_newer::ExcludeNewer::global" level = "expect" reason = "used by uv-bench benchmarks" -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "registry_client::RegistryClient::fetch_simple_index" -level = "expect" -reason = "used by the uv-dev package listing tool" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_options_metadata" -item = "OptionSet::documentation" -level = "expect" -reason = "used by uv-dev options reference generation" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "registry_client::SimpleIndexMetadata::iter" -level = "expect" -reason = "used by the uv-dev package listing tool" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_python" -item = "managed::platform_key_from_env" -level = "expect" -reason = "used by uv integration tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_auth" -item = "middleware::AuthMiddleware::with_cache" -level = "expect" -reason = "used by uv-auth unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_fastid" -item = "Id::secure" -level = "expect" -reason = "used by uv-fastid unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_installer" -item = "installer::Installer::<'a>::with_installer_name" -level = "expect" -reason = "used by uv-installer unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_python" -item = "downloads::ManagedPythonDownload::python_version" -level = "expect" -reason = "used by uv-python unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_python" -item = "managed::ManagedPythonInstallations::temp" -level = "expect" -reason = "used by uv-python unit tests" - [[override]] lint = "hawk::dead_public" crate = "uv_python" @@ -364,27 +133,6 @@ level = "expect" target = "cfg(not(unix))" reason = "used by uv-virtualenv only when analyzing a Unix target" -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "index_url::IndexLocations::simple_api_cache_control_for" -level = "expect" -reason = "used by uv-distribution-types unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep508" -item = "marker::tree::MarkerExpression::from_str" -level = "expect" -reason = "used by uv-pep508 unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pep508" -item = "marker::tree::MarkerTree::simplify_not_extras" -level = "expect" -reason = "used by uv-pep508 unit tests" - [[override]] lint = "hawk::dead_public" crate = "uv_keyring" @@ -392,49 +140,6 @@ item = "set_default_credential_builder" level = "expect" reason = "public mock credential API documented for tests" -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::new_with_target" -level = "expect" -reason = "used by uv-keyring platform unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::new_with_credential" -level = "expect" -reason = "used by uv-keyring platform unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::get_attributes" -level = "expect" -reason = "used by uv-keyring platform unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::update_attributes" -level = "expect" -reason = "used by uv-keyring platform unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "Entry::get_credential" -level = "expect" -reason = "used by uv-keyring platform unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "macos::MacCredential::get_credential" -level = "expect" -target = "cfg(target_os = \"macos\")" -reason = "used by uv-keyring platform unit tests" - [[override]] lint = "hawk::dead_public" crate = "uv_keyring" @@ -443,20 +148,6 @@ level = "expect" target = "cfg(windows)" reason = "used by uv-keyring platform unit tests" -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "mock::MockCredential::set_error" -level = "expect" -reason = "used by uv-keyring mock unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "mock::default_credential_builder" -level = "expect" -reason = "public mock credential API documented for tests" - [[override]] lint = "hawk::dead_public" crate = "uv_windows" @@ -500,1010 +191,27 @@ reason = "used by the uv-trampoline binary outside the selected uv graph" [[override]] lint = "hawk::dead_public" crate = "uv_test" -item = "PACKSE_VERSION" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "DEFAULT_PYTHON_VERSION" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "LATEST_PYTHON_3_15" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "LATEST_PYTHON_3_14" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "LATEST_PYTHON_3_13" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "LATEST_PYTHON_3_12" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "LATEST_PYTHON_3_11" +item = "TestContext::with_filtered_windows_temp_dir" level = "expect" reason = "public API of the integration test support crate" [[override]] lint = "hawk::dead_public" crate = "uv_test" -item = "LATEST_PYTHON_3_10" +item = "TestContext::clear_filters" level = "expect" reason = "public API of the integration test support crate" [[override]] lint = "hawk::dead_public" crate = "uv_test" -item = "build_vendor_links_url" +item = "TestContext::filters_without_standard_filters" level = "expect" reason = "public API of the integration test support crate" [[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "packse_index_url" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "INSTA_FILTERS" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::new_with_bin" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_exclude_newer" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_http_timeout" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_concurrent_installs" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_counts" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_cache_size" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_missing_file_error" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_exe_suffix" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_python_sources" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_python_names" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_virtualenv_bin" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_python_install_bin" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_pyvenv_cfg_filters" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_python_symlinks" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_path" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_link_mode_warning" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_not_executable" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_python_keys" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_latest_python_versions" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_windows_temp_dir" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_compiled_file_count" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_current_version" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_cyclonedx_filters" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_collapsed_whitespace" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_python_download_cache" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_empty_python_install_mirror" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_managed_python_dirs" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_versions_as_managed" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filter" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_unset_git_credential_helper" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::clear_filters" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_cache_on_cow_fs" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_cache_on_alt_fs" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_cache_on_lowlinks_fs" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_cache_on_nocow_fs" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_working_dir_on_cow_fs" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_working_dir_on_nocow_fs" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::test_bucket_dir" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::new_with_versions_and_bin" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::command" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::disallow_git_cli" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_git_lfs_config" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::add_shared_options" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::add_shared_args" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::add_shared_env" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_compile" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_sync" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_show" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_freeze" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_check" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_list" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::venv" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_install" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_uninstall" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_tree" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::pip_debug" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::help" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::init" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::sync" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::lock" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::audit" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::workspace_metadata" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::workspace_dir" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::workspace_list" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::export" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::format" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::build" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::version" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::self_version" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::self_update" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::publish" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_find" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_list" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_install" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_uninstall" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_upgrade" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_pin" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_dir" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::run" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::tool_run" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::tool_upgrade" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::tool_install" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::tool_list" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::tool_dir" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::tool_uninstall" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::add" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::remove" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::tree" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::clean" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::prune" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::cache_size" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::build_backend" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::interpreter" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_command" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::auth_login" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::auth_logout" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::auth_helper" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::auth_token" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_real_home" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::assert_command" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::assert_file" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::assert_installed" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::assert_not_installed" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::path_patterns" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_path" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::filters" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::filters_without_standard_filters" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::python_kind" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::site_packages" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::reset_venv" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::copy_ecosystem_project" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::diff_lock" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::read" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "diff_snapshot" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "site_packages_path" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "venv_bin_path" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "get_python" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "create_venv_from_executable" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "python_path_with_versions" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "python_installations_for_versions" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "apply_filters" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "run_and_format" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "run_and_format_with_status" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "copy_dir_ignore" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "make_project" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "READ_ONLY_GITHUB_TOKEN" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "READ_ONLY_GITHUB_TOKEN_2" -level = "expect" -target = "cfg(not(windows))" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "READ_ONLY_GITHUB_SSH_DEPLOY_KEY" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "decode_token" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "download_to_disk" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "ReadOnlyDirectoryGuard::new" -level = "expect" -target = "cfg(unix)" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_distribution_types" -item = "config_settings::ConfigSettings::is_empty" +lint = "hawk::unnecessary_public" +crate = "uv_distribution_types" +item = "config_settings::ConfigSettings::is_empty" level = "expect" reason = "kept public alongside the public len method" - From 29b5c05b2bab63657757016e7f3f1c3c7af510e9 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Wed, 27 May 2026 12:36:49 +0200 Subject: [PATCH 11/11] Remove TOML file --- hawk.toml | 217 ------------------------------------------------------ 1 file changed, 217 deletions(-) delete mode 100644 hawk.toml diff --git a/hawk.toml b/hawk.toml deleted file mode 100644 index 36da54207eb8e..0000000000000 --- a/hawk.toml +++ /dev/null @@ -1,217 +0,0 @@ -# Hawk analyzes the `uv` binary and workspace tests as a closed world; retain public API outside those graphs. -# Keep each retained finding expected so removing it requires deleting this entry. - -[[override]] -lint = "hawk::dead_public" -crate = "uv_dispatch" -item = "BuildDispatch::<'a>::with_build_extra_env_vars" -level = "expect" -reason = "retained library API outside the selected binary graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "credential::nop_credential_builder" -level = "expect" -reason = "used by the fallback credential path on unsupported targets" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_trampoline_builder" -item = "Launcher::write_to_file" -level = "expect" -target = "cfg(not(windows))" -reason = "used by the Windows uv command when analyzing a non-Windows target" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_trampoline_builder" -item = "Launcher::with_python_path" -level = "expect" -target = "cfg(not(windows))" -reason = "used by the Windows uv command when analyzing a non-Windows target" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_distribution_types" -item = "resolution::Resolution::is_empty" -level = "expect" -reason = "required companion to public Resolution::len" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_resolver" -item = "lock::Lock::is_empty" -level = "expect" -reason = "required companion to public Lock::len" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_resolver" -item = "resolution::output::ResolverOutput::is_empty" -level = "expect" -reason = "required companion to public ResolverOutput::len" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_fs" -item = "copy_atomic_sync" -level = "expect" -target = "cfg(not(unix))" -reason = "used by uv-install-wheel only when analyzing a Unix target" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_fs" -item = "with_retry_sync" -level = "expect" -target = "cfg(unix)" -reason = "used by uv-install-wheel only when analyzing a non-Unix target" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_pypi_types" -item = "dependency_groups::DependencyGroups::iter" -level = "expect" -reason = "required companion to IntoIterator for &DependencyGroups" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::BaseClientBuilder::<'a>::extra_middleware" -level = "expect" -reason = "supported public middleware extension API" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "registry_client::RegistryClientBuilder::<'a>::extra_middleware" -level = "expect" -reason = "supported public middleware extension API" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "registry_client::RegistryClientBuilder::<'a>::with_reqwest_client" -level = "expect" -reason = "supported public custom HTTP client API" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "base_client::BaseClientBuilder::<'a>::proxy" -level = "expect" -reason = "supported public proxy configuration API" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_client" -item = "registry_client::RegistryClientBuilder::<'a>::proxy" -level = "expect" -reason = "supported public proxy configuration API" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_resolver" -item = "exclude_newer::ExcludeNewer::global" -level = "expect" -reason = "used by uv-bench benchmarks" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_python" -item = "interpreter::Interpreter::pointer_size" -level = "expect" -target = "cfg(not(unix))" -reason = "used by uv-virtualenv only when analyzing a Unix target" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_python" -item = "pointer_size::PointerSize::is_64" -level = "expect" -target = "cfg(not(unix))" -reason = "used by uv-virtualenv only when analyzing a Unix target" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "set_default_credential_builder" -level = "expect" -reason = "public mock credential API documented for tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_keyring" -item = "windows::WinCredential::get_credential" -level = "expect" -target = "cfg(windows)" -reason = "used by uv-keyring platform unit tests" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_windows" -item = "ctrl_handler::CtrlHandlerError::code" -level = "expect" -target = "cfg(windows)" -reason = "used by the uv-trampoline binary outside the selected uv graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_windows" -item = "job::JobError::code" -level = "expect" -target = "cfg(windows)" -reason = "used by the uv-trampoline binary outside the selected uv graph" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_windows" -item = "job::JobError::message" -level = "expect" -target = "cfg(windows)" -reason = "used by the uv-trampoline binary outside the selected uv graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_windows" -item = "job::Job::new" -level = "expect" -target = "cfg(windows)" -reason = "used by the uv-trampoline binary outside the selected uv graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_windows" -item = "job::Job::assign_process" -level = "expect" -target = "cfg(windows)" -reason = "used by the uv-trampoline binary outside the selected uv graph" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::with_filtered_windows_temp_dir" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::clear_filters" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::dead_public" -crate = "uv_test" -item = "TestContext::filters_without_standard_filters" -level = "expect" -reason = "public API of the integration test support crate" - -[[override]] -lint = "hawk::unnecessary_public" -crate = "uv_distribution_types" -item = "config_settings::ConfigSettings::is_empty" -level = "expect" -reason = "kept public alongside the public len method"