Bump MSRV to 1.84 (#12670)
## Summary Closes https://github.com/astral-sh/uv/issues/12649.
This commit is contained in:
@@ -978,7 +978,7 @@ pub fn find_python_installations<'a>(
|
||||
PythonRequest::Version(version) => {
|
||||
if let Err(err) = version.check_supported() {
|
||||
return Box::new(iter::once(Err(Error::InvalidVersionRequest(err))));
|
||||
};
|
||||
}
|
||||
Box::new({
|
||||
debug!("Searching for {request} in {sources}");
|
||||
python_interpreters(version, None, environments, preference, cache)
|
||||
@@ -1004,7 +1004,7 @@ pub fn find_python_installations<'a>(
|
||||
PythonRequest::ImplementationVersion(implementation, version) => {
|
||||
if let Err(err) = version.check_supported() {
|
||||
return Box::new(iter::once(Err(Error::InvalidVersionRequest(err))));
|
||||
};
|
||||
}
|
||||
Box::new({
|
||||
debug!("Searching for {request} in {sources}");
|
||||
python_interpreters(
|
||||
@@ -1026,8 +1026,8 @@ pub fn find_python_installations<'a>(
|
||||
if let Some(version) = request.version() {
|
||||
if let Err(err) = version.check_supported() {
|
||||
return Box::new(iter::once(Err(Error::InvalidVersionRequest(err))));
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
Box::new({
|
||||
debug!("Searching for {request} in {sources}");
|
||||
python_interpreters(
|
||||
|
||||
@@ -555,7 +555,7 @@ impl ManagedPythonDownload {
|
||||
return Ok(DownloadResult::AlreadyAvailable(path));
|
||||
}
|
||||
|
||||
let filename = url.path_segments().unwrap().last().unwrap();
|
||||
let filename = url.path_segments().unwrap().next_back().unwrap();
|
||||
let ext = SourceDistExtension::from_path(filename)
|
||||
.map_err(|err| Error::MissingExtension(url.to_string(), err))?;
|
||||
let (reader, size) = read_url(&url, client).await?;
|
||||
@@ -593,7 +593,7 @@ impl ManagedPythonDownload {
|
||||
.await
|
||||
.map_err(|err| Error::ExtractError(filename.to_string(), err))?;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
hasher.finish().await.map_err(Error::HashExhaustion)?;
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ impl PythonEnvironment {
|
||||
}));
|
||||
}
|
||||
Err(err) => return Err(Error::Discovery(err.into())),
|
||||
};
|
||||
}
|
||||
|
||||
if root.as_ref().is_file() {
|
||||
return Err(InvalidEnvironment {
|
||||
@@ -211,7 +211,7 @@ impl PythonEnvironment {
|
||||
kind: InvalidEnvironmentKind::MissingExecutable(executable.clone()),
|
||||
}
|
||||
.into());
|
||||
};
|
||||
}
|
||||
|
||||
let interpreter = Interpreter::query(executable, cache)?;
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ mod tests {
|
||||
match self.search_path.as_mut() {
|
||||
Some(paths) => paths.push(path),
|
||||
None => self.search_path = Some(vec![path]),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a new directory and add it to the search path.
|
||||
|
||||
@@ -496,7 +496,7 @@ impl ManagedPythonInstallation {
|
||||
err,
|
||||
})
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -224,7 +224,7 @@ fn find_sysconfigdata(
|
||||
let metadata = entry.metadata()?;
|
||||
if metadata.is_symlink() {
|
||||
continue;
|
||||
};
|
||||
}
|
||||
|
||||
if metadata.is_file() {
|
||||
return Ok(entry.path());
|
||||
|
||||
@@ -111,7 +111,7 @@ pub(crate) fn conda_environment_from_env(kind: CondaEnvironmentKind) -> Option<P
|
||||
|
||||
if kind != CondaEnvironmentKind::from_prefix_path(&path) {
|
||||
return None;
|
||||
};
|
||||
}
|
||||
|
||||
Some(path)
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ pub fn remove_registry_entry<'a>(
|
||||
.context("Failed to clear registry entries under HKCU:\\{python_entry}"),
|
||||
));
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,6 +284,6 @@ pub fn remove_orphan_registry_entries(installations: &[ManagedPythonInstallation
|
||||
if let Err(err) = CURRENT_USER.remove_tree(&python_entry) {
|
||||
// TODO(konsti): We don't have an installation key here.
|
||||
warn_user_once!("Failed to remove orphan registry key HKCU:\\{python_entry}: {err}");
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user