mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-19 19:44:40 +00:00
Account for python_downloads_json_url on Pre-release Python version warnings (#16737)
Solves #16711
This commit is contained in:
parent
4e4235648a
commit
7f4d8c67a8
9 changed files with 62 additions and 8 deletions
|
|
@ -59,12 +59,13 @@ impl PythonInstallation {
|
|||
request: &PythonRequest,
|
||||
environments: EnvironmentPreference,
|
||||
preference: PythonPreference,
|
||||
python_downloads_json_url: Option<&str>,
|
||||
cache: &Cache,
|
||||
preview: Preview,
|
||||
) -> Result<Self, Error> {
|
||||
let installation =
|
||||
find_python_installation(request, environments, preference, cache, preview)??;
|
||||
installation.warn_if_outdated_prerelease(request, None);
|
||||
installation.warn_if_outdated_prerelease(request, python_downloads_json_url);
|
||||
Ok(installation)
|
||||
}
|
||||
|
||||
|
|
@ -74,12 +75,13 @@ impl PythonInstallation {
|
|||
request: &PythonRequest,
|
||||
environments: EnvironmentPreference,
|
||||
preference: PythonPreference,
|
||||
python_downloads_json_url: Option<&str>,
|
||||
cache: &Cache,
|
||||
preview: Preview,
|
||||
) -> Result<Self, Error> {
|
||||
let installation =
|
||||
find_best_python_installation(request, environments, preference, cache, preview)??;
|
||||
installation.warn_if_outdated_prerelease(request, None);
|
||||
installation.warn_if_outdated_prerelease(request, python_downloads_json_url);
|
||||
Ok(installation)
|
||||
}
|
||||
|
||||
|
|
@ -102,7 +104,14 @@ impl PythonInstallation {
|
|||
let request = request.unwrap_or(&PythonRequest::Default);
|
||||
|
||||
// Search for the installation
|
||||
let err = match Self::find(request, environments, preference, cache, preview) {
|
||||
let err = match Self::find(
|
||||
request,
|
||||
environments,
|
||||
preference,
|
||||
python_downloads_json_url,
|
||||
cache,
|
||||
preview,
|
||||
) {
|
||||
Ok(installation) => return Ok(installation),
|
||||
Err(err) => err,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue