Update Rust to v1.77 (#2591)

This commit is contained in:
Charlie Marsh 2024-03-27 10:41:27 -04:00 committed by GitHub
parent 365c292525
commit 8c7a6038fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 21 additions and 36 deletions

12
Cargo.lock generated
View File

@ -213,17 +213,6 @@ dependencies = [
"tokio",
]
[[package]]
name = "async-recursion"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.52",
]
[[package]]
name = "async-trait"
version = "0.1.78"
@ -2963,7 +2952,6 @@ version = "0.0.1"
dependencies = [
"anyhow",
"assert_fs",
"async-recursion",
"fs-err",
"indoc",
"insta",

View File

@ -9,7 +9,7 @@ resolver = "2"
[workspace.package]
edition = "2021"
rust-version = "1.76"
rust-version = "1.77"
homepage = "https://pypi.org/project/uv/"
documentation = "https://pypi.org/project/uv/"
repository = "https://github.com/astral-sh/uv"
@ -53,7 +53,6 @@ anstream = { version = "0.6.13" }
anyhow = { version = "1.0.80" }
async-channel = { version = "2.2.0" }
async-compression = { version = "0.4.6" }
async-recursion = { version = "1.0.5" }
async-trait = { version = "0.1.78" }
async_http_range_reader = { version = "0.7.0" }
async_zip = { git = "https://github.com/charliermarsh/rs-async-zip", rev = "d76801da0943de985254fc6255c0e476b57c5836", features = ["deflate"] }

View File

@ -20,7 +20,6 @@ uv-normalize = { workspace = true }
uv-types = { workspace = true }
uv-warnings = { workspace = true }
async-recursion = { workspace = true }
fs-err = { workspace = true }
regex = { workspace = true }
reqwest = { workspace = true, optional = true }

View File

@ -40,7 +40,6 @@ use std::io;
use std::path::{Path, PathBuf};
use std::str::FromStr;
use async_recursion::async_recursion;
use serde::{Deserialize, Serialize};
use tracing::instrument;
use unscanny::{Pattern, Scanner};
@ -413,12 +412,11 @@ impl RequirementsTxt {
/// the current working directory. However, relative paths to sub-files (e.g., `-r ../requirements.txt`)
/// are resolved against the directory of the containing `requirements.txt` file, to match
/// `pip`'s behavior.
#[async_recursion]
pub async fn parse_inner(
content: &str,
working_dir: &Path,
requirements_dir: &Path,
client_builder: &BaseClientBuilder<'async_recursion>,
client_builder: &BaseClientBuilder<'_>,
) -> Result<Self, RequirementsTxtParserError> {
let mut s = Scanner::new(content);
@ -437,13 +435,14 @@ impl RequirementsTxt {
} else {
requirements_dir.join(filename.as_ref())
};
let sub_requirements = Self::parse(&sub_file, working_dir, client_builder)
.await
.map_err(|err| RequirementsTxtParserError::Subfile {
source: Box::new(err),
start,
end,
})?;
let sub_requirements =
Box::pin(Self::parse(&sub_file, working_dir, client_builder))
.await
.map_err(|err| RequirementsTxtParserError::Subfile {
source: Box::new(err),
start,
end,
})?;
// Disallow conflicting `--index-url` in nested `requirements` files.
if sub_requirements.index_url.is_some()
@ -475,13 +474,15 @@ impl RequirementsTxt {
} else {
requirements_dir.join(filename.as_ref())
};
let sub_constraints = Self::parse(&sub_file, working_dir, client_builder)
.await
.map_err(|err| RequirementsTxtParserError::Subfile {
source: Box::new(err),
start,
end,
})?;
let sub_constraints =
Box::pin(Self::parse(&sub_file, working_dir, client_builder))
.await
.map_err(|err| RequirementsTxtParserError::Subfile {
source: Box::new(err),
start,
end,
})?;
// Treat any nested requirements or constraints as constraints. This differs
// from `pip`, which seems to treat `-r` requirements in constraints files as
// _requirements_, but we don't want to support that.

View File

@ -163,9 +163,7 @@ impl<'a> DistFinder<'a> {
resolvable_dist
.compatible_wheel()
.map(|(dist, tag_priority)| (dist.clone(), tag_priority)),
resolvable_dist
.compatible_source()
.map(std::clone::Clone::clone),
resolvable_dist.compatible_source().cloned(),
)
} else {
(None, None, None)

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "1.76"
channel = "1.77"