mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-22 00:02:32 +00:00
Add retries for Python downloads (#9274)
## Summary This uses the same approach as in the rest of uv, but with another dedicated method for retries. Closes https://github.com/astral-sh/uv/issues/8525.
This commit is contained in:
parent
289771e311
commit
1b13036674
16 changed files with 107 additions and 54 deletions
|
@ -86,8 +86,8 @@ impl PythonInstallation {
|
|||
client_builder: &BaseClientBuilder<'a>,
|
||||
cache: &Cache,
|
||||
reporter: Option<&dyn Reporter>,
|
||||
python_install_mirror: Option<String>,
|
||||
pypy_install_mirror: Option<String>,
|
||||
python_install_mirror: Option<&str>,
|
||||
pypy_install_mirror: Option<&str>,
|
||||
) -> Result<Self, Error> {
|
||||
let request = request.unwrap_or_else(|| &PythonRequest::Default);
|
||||
|
||||
|
@ -132,8 +132,8 @@ impl PythonInstallation {
|
|||
client_builder: &BaseClientBuilder<'a>,
|
||||
cache: &Cache,
|
||||
reporter: Option<&dyn Reporter>,
|
||||
python_install_mirror: Option<String>,
|
||||
pypy_install_mirror: Option<String>,
|
||||
python_install_mirror: Option<&str>,
|
||||
pypy_install_mirror: Option<&str>,
|
||||
) -> Result<Self, Error> {
|
||||
let installations = ManagedPythonInstallations::from_settings()?.init()?;
|
||||
let installations_dir = installations.root();
|
||||
|
@ -145,7 +145,7 @@ impl PythonInstallation {
|
|||
|
||||
info!("Fetching requested Python...");
|
||||
let result = download
|
||||
.fetch(
|
||||
.fetch_with_retry(
|
||||
&client,
|
||||
installations_dir,
|
||||
&cache_dir,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue