Skip to content

Commit

Permalink
misc: Cleanup and fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ruben-arts committed Dec 5, 2024
1 parent a3fb057 commit 652ef37
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 17 deletions.
5 changes: 0 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,6 @@ tokio = { workspace = true, features = ["rt"] }


[patch.crates-io]
#reqwest-middleware = { version = "0.4" }

#reqwest-middleware = { git = "https://github.com/TrueLayer/reqwest-middleware", rev = "d95ec5a99fcc9a4339e1850d40378bbfe55ab121" }
#reqwest-retry = { git = "https://github.com/TrueLayer/reqwest-middleware", rev = "d95ec5a99fcc9a4339e1850d40378bbfe55ab121" }

#file_url = { git = "https://github.com/conda/rattler", branch = "main" }
#rattler = { git = "https://github.com/conda/rattler", branch = "main" }
#rattler_conda_types = { git = "https://github.com/conda/rattler", branch = "main" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: crates/pixi_manifest/src/pypi/pypi_requirement.rs
expression: snapshot
snapshot_kind: text
---
- input:
ver: 1.2.3
Expand Down Expand Up @@ -43,7 +44,7 @@ expression: snapshot
- input:
git: "ssh://github.com:conda-forge/21cmfast-feedstock"
result:
error: "ERROR: invalid value: string \"ssh://github.com:conda-forge/21cmfast-feedstock\", expected invalid port number"
error: "ERROR: invalid port number: \"ssh://github.com:conda-forge/21cmfast-feedstock\""
- input:
branch: main
tag: v1
Expand Down
4 changes: 1 addition & 3 deletions src/install_pypi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,10 @@ pub async fn update_python_distributions(
let dep_metadata = DependencyMetadata::default();
let constraints = Constraints::default();

let in_flight_arc = uv_context.in_flight.clone();
let in_flight = in_flight_arc.as_ref();
let shared_state = SharedState::new(
git_resolver,
in_memory_index,
in_flight.clone(),
uv_context.in_flight.clone(),
uv_context.capabilities.clone(),
);

Expand Down
4 changes: 1 addition & 3 deletions src/lock_file/resolve/pypi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,10 @@ pub async fn resolve_pypi(
};
let git_resolver = GitResolver::default();

let in_flight_arc = context.in_flight.clone();
let in_flight = in_flight_arc.as_ref();
let shared_state = SharedState::new(
git_resolver.clone(),
build_dispatch_in_memory_index,
in_flight.clone(),
context.in_flight.clone(),
context.capabilities.clone(),
);

Expand Down
7 changes: 2 additions & 5 deletions src/lock_file/resolve/uv_resolution_context.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::sync::Arc;

use miette::{Context, IntoDiagnostic};
use uv_cache::Cache;
use uv_configuration::{BuildOptions, Concurrency, SourceStrategy, TrustedHost};
Expand All @@ -15,7 +13,7 @@ use pixi_uv_conversions::{to_uv_trusted_host, ConversionError};
#[derive(Clone)]
pub struct UvResolutionContext {
pub cache: Cache,
pub in_flight: Arc<InFlight>,
pub in_flight: InFlight,
pub build_options: BuildOptions,
pub hash_strategy: HashStrategy,
pub client: reqwest::Client,
Expand Down Expand Up @@ -48,7 +46,6 @@ impl UvResolutionContext {
}
};

let in_flight = Arc::new(InFlight::default());
let allow_insecure_host = project
.config()
.pypi_config
Expand All @@ -66,7 +63,7 @@ impl UvResolutionContext {
.context("failed to parse trusted host")?;
Ok(Self {
cache,
in_flight,
in_flight: InFlight::default(),
hash_strategy: HashStrategy::None,
client: project.client().clone(),
build_options: BuildOptions::default(),
Expand Down

0 comments on commit 652ef37

Please sign in to comment.