Skip to content

Commit c4dc9aa

Browse files
authored
chore(deps): bump uv to 0.10.12 (#6058)
1 parent e081646 commit c4dc9aa

16 files changed

Lines changed: 557 additions & 517 deletions

File tree

Cargo.lock

Lines changed: 465 additions & 439 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -184,35 +184,34 @@ tracing-test = "0.2"
184184
typed-path = "0.12.0"
185185
# Bumping this to a higher version breaks the Windows path handling.
186186
url = "2.5.4"
187-
uv-auth = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
188-
uv-build-frontend = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
189-
uv-cache = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
190-
uv-cache-info = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
191-
uv-cache-key = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
192-
uv-client = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
193-
uv-configuration = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
194-
uv-dispatch = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
195-
uv-distribution = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
196-
uv-distribution-filename = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
197-
uv-distribution-types = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
198-
uv-flags = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
199-
uv-git = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
200-
uv-git-types = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
201-
uv-install-wheel = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
202-
uv-installer = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
203-
uv-normalize = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
204-
uv-pep440 = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
205-
uv-pep508 = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
206-
uv-platform-tags = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
207-
uv-preview = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
208-
uv-pypi-types = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
209-
uv-python = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
210-
uv-redacted = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
211-
uv-requirements = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
212-
uv-requirements-txt = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
213-
uv-resolver = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
214-
uv-types = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
215-
uv-workspace = { git = "https://github.com/astral-sh/uv", tag = "0.9.10" }
187+
uv-build-frontend = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
188+
uv-cache = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
189+
uv-cache-info = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
190+
uv-cache-key = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
191+
uv-client = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
192+
uv-configuration = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
193+
uv-dispatch = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
194+
uv-distribution = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
195+
uv-distribution-filename = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
196+
uv-distribution-types = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
197+
uv-flags = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
198+
uv-git = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
199+
uv-git-types = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
200+
uv-install-wheel = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
201+
uv-installer = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
202+
uv-normalize = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
203+
uv-pep440 = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
204+
uv-pep508 = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
205+
uv-platform-tags = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
206+
uv-preview = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
207+
uv-pypi-types = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
208+
uv-python = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
209+
uv-redacted = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
210+
uv-requirements = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
211+
uv-requirements-txt = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
212+
uv-resolver = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
213+
uv-types = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
214+
uv-workspace = { git = "https://github.com/astral-sh/uv", tag = "0.10.12" }
216215
which = "8.0.0"
217216
xxhash-rust = "0.8.15"
218217
zip = { version = "8.0.0", default-features = false }

crates/pixi_cli/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ tracing = { workspace = true }
9898
tracing-subscriber = { workspace = true, features = ["env-filter"] }
9999
typed-path = { workspace = true }
100100
url = { workspace = true }
101-
uv-client = { workspace = true }
102101
uv-configuration = { workspace = true }
103102
uv-pep508 = { workspace = true }
104103
uv-pypi-types = { workspace = true }

crates/pixi_cli/src/import.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use pixi_uv_conversions::convert_uv_requirements_to_pep508;
1010
use rattler_conda_types::Platform;
1111

1212
use tracing::warn;
13-
use uv_client::BaseClientBuilder;
1413
use uv_requirements_txt::RequirementsTxt;
1514

1615
use miette::{Diagnostic, IntoDiagnostic, Result};
@@ -198,13 +197,9 @@ async fn import(args: Args, format: &ImportFileFormat) -> miette::Result<()> {
198197
(conda_deps, pypi_deps)
199198
}
200199
ProcessedInput::PypiTxt => {
201-
let reqs_txt = RequirementsTxt::parse(
202-
&input_file,
203-
workspace.workspace().root(),
204-
&BaseClientBuilder::default(),
205-
)
206-
.await
207-
.into_diagnostic()?;
200+
let reqs_txt = RequirementsTxt::parse(&input_file, workspace.workspace().root())
201+
.await
202+
.into_diagnostic()?;
208203
let pypi_deps = convert_uv_requirements_txt_to_pep508(reqs_txt)?;
209204

210205
(vec![], pypi_deps)

crates/pixi_core/src/lock_file/resolve/build_dispatch.rs

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use uv_build_frontend::SourceBuild;
3737
use uv_cache::Cache;
3838
use uv_client::RegistryClient;
3939
use uv_configuration::{
40-
BuildKind, BuildOptions, BuildOutput, Concurrency, Constraints, IndexStrategy, SourceStrategy,
40+
BuildKind, BuildOptions, BuildOutput, Concurrency, Constraints, IndexStrategy, NoSources,
4141
};
4242
use uv_dispatch::{BuildDispatch, BuildDispatchError, SharedState};
4343
use uv_distribution_filename::DistFilename;
@@ -70,7 +70,7 @@ pub struct UvBuildDispatchParams<'a> {
7070
shared_state: SharedState,
7171
link_mode: uv_install_wheel::LinkMode,
7272
exclude_newer: Option<ExcludeNewer>,
73-
sources: SourceStrategy,
73+
sources: NoSources,
7474
concurrency: Concurrency,
7575
preview: uv_preview::Preview,
7676
workspace_cache: WorkspaceCache,
@@ -105,7 +105,7 @@ impl<'a> UvBuildDispatchParams<'a> {
105105
link_mode: LinkMode::default(),
106106
constraints: Constraints::default(),
107107
exclude_newer: None,
108-
sources: SourceStrategy::default(),
108+
sources: NoSources::default(),
109109
concurrency: Concurrency::default(),
110110
preview: uv_preview::Preview::default(),
111111
workspace_cache: WorkspaceCache::default(),
@@ -125,7 +125,7 @@ impl<'a> UvBuildDispatchParams<'a> {
125125
}
126126

127127
/// Set the source strategy for the build dispatch
128-
pub fn with_source_strategy(mut self, sources: SourceStrategy) -> Self {
128+
pub fn with_no_sources(mut self, sources: NoSources) -> Self {
129129
self.sources = sources;
130130
self
131131
}
@@ -424,9 +424,9 @@ impl<'a> LazyBuildDispatch<'a> {
424424
self.params.build_options,
425425
self.params.hasher,
426426
self.params.exclude_newer.clone().unwrap_or_default(),
427-
self.params.sources,
427+
self.params.sources.clone(),
428428
self.params.workspace_cache.clone(),
429-
self.params.concurrency,
429+
self.params.concurrency.clone(),
430430
self.params.preview,
431431
)
432432
.with_build_extra_env_vars(env_vars);
@@ -478,8 +478,8 @@ impl BuildContext for LazyBuildDispatch<'_> {
478478
self.params.config_settings
479479
}
480480

481-
fn sources(&self) -> uv_configuration::SourceStrategy {
482-
self.params.sources
481+
fn sources(&self) -> &uv_configuration::NoSources {
482+
&self.params.sources
483483
}
484484

485485
fn locations(&self) -> &uv_distribution_types::IndexLocations {
@@ -518,7 +518,7 @@ impl BuildContext for LazyBuildDispatch<'_> {
518518
install_path: &'a Path,
519519
version_id: Option<&'a str>,
520520
dist: Option<&'a SourceDist>,
521-
sources: SourceStrategy,
521+
sources: &'a NoSources,
522522
build_kind: BuildKind,
523523
build_output: BuildOutput,
524524
build_stack: BuildStack,
@@ -545,12 +545,20 @@ impl BuildContext for LazyBuildDispatch<'_> {
545545
source: &'a Path,
546546
subdirectory: Option<&'a Path>,
547547
output_dir: &'a Path,
548+
sources: uv_configuration::NoSources,
548549
build_kind: BuildKind,
549550
version_id: Option<&'a str>,
550551
) -> Result<Option<DistFilename>, impl IsBuildBackendError> {
551552
let dispatch = self.get_or_try_init().await?;
552553
dispatch
553-
.direct_build(source, subdirectory, output_dir, build_kind, version_id)
554+
.direct_build(
555+
source,
556+
subdirectory,
557+
output_dir,
558+
sources,
559+
build_kind,
560+
version_id,
561+
)
554562
.await
555563
.map_err(LazyBuildDispatchError::from)
556564
}

crates/pixi_core/src/lock_file/resolve/pypi.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,8 @@ pub async fn resolve_pypi(
581581
// mostly with build isolation. In that case we want to use fresh
582582
// non-tampered requests.
583583
.with_shared_state(context.shared_state.fork())
584-
.with_source_strategy(context.source_strategy)
585-
.with_concurrency(context.concurrency)
584+
.with_no_sources(context.no_sources.clone())
585+
.with_concurrency(context.concurrency.clone())
586586
.with_link_mode(link_mode);
587587

588588
// Use cached build dispatch dependencies
@@ -734,7 +734,7 @@ pub async fn resolve_pypi(
734734
DistributionDatabase::new(
735735
&registry_client,
736736
&lazy_build_dispatch,
737-
context.concurrency.downloads,
737+
context.concurrency.downloads_semaphore.clone(),
738738
),
739739
)
740740
.with_reporter(UvReporter::new_arc(
@@ -763,7 +763,7 @@ pub async fn resolve_pypi(
763763
DistributionDatabase::new(
764764
&registry_client,
765765
&lazy_build_dispatch,
766-
context.concurrency.downloads,
766+
context.concurrency.downloads_semaphore.clone(),
767767
),
768768
&flat_index,
769769
Some(&provider_tags),
@@ -833,7 +833,7 @@ pub async fn resolve_pypi(
833833
&registry_client,
834834
resolution,
835835
&context.capabilities,
836-
context.concurrency.downloads,
836+
context.concurrency.downloads_semaphore.clone(),
837837
project_root,
838838
&original_git_references,
839839
)
@@ -997,13 +997,13 @@ async fn lock_pypi_packages(
997997
registry_client: &Arc<RegistryClient>,
998998
resolution: Resolution,
999999
index_capabilities: &IndexCapabilities,
1000-
concurrent_downloads: usize,
1000+
downloads_semaphore: Arc<tokio::sync::Semaphore>,
10011001
abs_project_root: &Path,
10021002
original_git_references: &HashMap<uv_normalize::PackageName, pixi_spec::GitReference>,
10031003
) -> miette::Result<LockedPypiRecords> {
10041004
let mut locked_packages = Vec::with_capacity(resolution.len());
10051005
let database =
1006-
DistributionDatabase::new(registry_client, pixi_build_dispatch, concurrent_downloads);
1006+
DistributionDatabase::new(registry_client, pixi_build_dispatch, downloads_semaphore);
10071007
for dist in resolution.distributions() {
10081008
// If this refers to a conda package we can skip it
10091009
if conda_python_packages.contains_key(dist.name()) {

crates/pixi_core/src/lock_file/satisfiability/pypi.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,8 @@ async fn read_local_package_metadata(
639639
.with_index_strategy(index_strategy)
640640
.with_workspace_cache(ctx.uv_context.workspace_cache.clone())
641641
.with_shared_state(ctx.uv_context.shared_state.fork())
642-
.with_source_strategy(ctx.uv_context.source_strategy)
643-
.with_concurrency(ctx.uv_context.concurrency);
642+
.with_no_sources(ctx.uv_context.no_sources.clone())
643+
.with_concurrency(ctx.uv_context.concurrency.clone());
644644

645645
// Get or create conda prefix updater for the environment
646646
// Use best_platform() because we can only install/run Python on the host platform
@@ -700,7 +700,7 @@ async fn read_local_package_metadata(
700700
let database = DistributionDatabase::new(
701701
&registry_client,
702702
&lazy_build_dispatch,
703-
ctx.uv_context.concurrency.downloads,
703+
ctx.uv_context.concurrency.downloads_semaphore.clone(),
704704
);
705705

706706
// Missing or unparsable pyproject -> trust the lock.
@@ -709,7 +709,7 @@ async fn read_local_package_metadata(
709709
tracing::debug!(package = %package_name, "no readable pyproject.toml");
710710
return Ok(None);
711711
};
712-
let Ok(pyproject_toml) = PyProjectToml::from_toml(&contents) else {
712+
let Ok(pyproject_toml) = PyProjectToml::from_toml(&contents, pyproject_path.display()) else {
713713
tracing::debug!(package = %package_name, "pyproject.toml could not be parsed");
714714
return Ok(None);
715715
};

crates/pixi_core/src/lock_file/satisfiability/pypi_metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ dependencies = ["numpy"]
250250
test = ["pytest"]
251251
dev = ["foo[test]"]
252252
"#;
253-
let pyproject = uv_pypi_types::PyProjectToml::from_toml(toml).unwrap();
253+
let pyproject = uv_pypi_types::PyProjectToml::from_toml(toml, "").unwrap();
254254
let requires_dist = uv_pypi_types::RequiresDist::from_pyproject_toml(pyproject).unwrap();
255255
let rendered: Vec<String> = requires_dist
256256
.requires_dist

crates/pixi_install_pypi/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ tokio = { workspace = true }
4141
tracing = { workspace = true }
4242
typed-path = { workspace = true }
4343
url = { workspace = true }
44-
uv-auth = { workspace = true }
4544
uv-cache = { workspace = true }
4645
uv-cache-info = { workspace = true }
4746
uv-client = { workspace = true }

crates/pixi_install_pypi/src/lib.rs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ use rattler_conda_types::Platform;
3535
use rattler_lock::{PypiDistributionData, PypiIndexes, PypiPackageData, UrlOrPath};
3636
use rayon::prelude::*;
3737
use utils::elapsed;
38-
use uv_auth::store_credentials_from_url;
3938
use uv_client::{Connectivity, FlatIndexClient, RegistryClient};
4039
use uv_configuration::{BuildOptions, Constraints, IndexStrategy};
4140
use uv_dispatch::BuildDispatch;
@@ -904,13 +903,22 @@ impl<'a> PyPIEnvironmentUpdater<'a> {
904903
let distribution_database = DistributionDatabase::new(
905904
setup.registry_client.as_ref(),
906905
&build_dispatch,
907-
self.context_config.uv_context.concurrency.downloads,
906+
self.context_config
907+
.uv_context
908+
.concurrency
909+
.downloads_semaphore
910+
.clone(),
908911
);
909912

910913
// Before hitting the network let's make sure the credentials are available to
911-
// uv
914+
// uv. As of uv 0.9.16, the global credentials cache moved to a per-client
915+
// `CredentialsCache` reachable via the `BaseClient` underneath
916+
// `RegistryClient`'s `CachedClient`.
917+
let base_client = setup.registry_client.cached_client().uncached();
912918
for url in setup.index_locations.indexes().map(|index| index.url()) {
913-
let success = store_credentials_from_url(url.url());
919+
let success = base_client
920+
.credentials_cache()
921+
.store_credentials_from_url(url.url());
914922
tracing::debug!("Stored credentials for {}: {}", url, success);
915923
}
916924

@@ -974,9 +982,9 @@ impl<'a> PyPIEnvironmentUpdater<'a> {
974982
&setup.build_options,
975983
&self.context_config.uv_context.hash_strategy,
976984
setup.exclude_newer.clone(),
977-
self.context_config.uv_context.source_strategy,
985+
self.context_config.uv_context.no_sources.clone(),
978986
self.context_config.uv_context.workspace_cache.clone(),
979-
self.context_config.uv_context.concurrency,
987+
self.context_config.uv_context.concurrency.clone(),
980988
self.context_config.uv_context.preview,
981989
)
982990
// Important: this passes any CONDA activation to the uv build process

0 commit comments

Comments
 (0)