Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: To do clean up #1735

Merged
merged 3 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/pixi_manifest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ rattler_solve = { workspace = true, features = ["serde"] }
rattler_virtual_packages = { workspace = true }

# TODO: Remove these dependencies
console = "0.15.8"
console = { workspace = true }
miette = { workspace = true }

[dev-dependencies]
Expand Down
7 changes: 0 additions & 7 deletions src/utils/reqwest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use std::{path::PathBuf, sync::Arc, time::Duration};
use rattler_networking::{
authentication_storage::{self, backends::file::FileStorageError},
mirror_middleware::Mirror,
retry_policies::ExponentialBackoff,
AuthenticationMiddleware, AuthenticationStorage, MirrorMiddleware, OciMiddleware,
};

Expand All @@ -13,12 +12,6 @@ use std::collections::HashMap;

use pixi_config::Config;

/// The default retry policy employed by pixi.
/// TODO: At some point we might want to make this configurable.
pub fn default_retry_policy() -> ExponentialBackoff {
ExponentialBackoff::builder().build_with_max_retries(3)
}

fn auth_middleware(config: &Config) -> Result<AuthenticationMiddleware, FileStorageError> {
if let Some(auth_file) = config.authentication_override_file() {
tracing::info!("Loading authentication from file: {:?}", auth_file);
Expand Down
8 changes: 6 additions & 2 deletions src/utils/uv/requirements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,19 @@ pub fn as_uv_req(
.unwrap_or_else(String::new);
let verbatim = VerbatimUrl::from_path(canonicalized.clone())?.with_given(given);

// TODO: we should maybe also give an error when editable is used for something
// that is not a directory.
if canonicalized.is_dir() {
RequirementSource::Directory {
install_path: canonicalized,
lock_path: path.clone(),
editable: editable.unwrap_or_default(),
url: verbatim,
}
} else if *editable == Some(true) {
{
return Err(AsPep508Error::EditableIsNotDir {
path: canonicalized,
});
}
} else {
RequirementSource::Path {
install_path: canonicalized,
Expand Down
Loading