astral-sh
uv
BlogDocsChangelog

Retry on "too many open file" errors when uninstalling Python

#17463
Comparing
zaniebot:claude/retry-open-files-error-o5T7E
(
5f3655d
) with
main
(
10c9355
)
CodSpeed Performance Gauge
+1%
Untouched
5
Ignored
1

Benchmarks

Passed

resolve_warm_jupyter
crates/uv-bench/benches/uv.rs::uv::resolve_warm_jupyter
CodSpeed Performance Gauge
+5%
76.1 ms72.2 ms
resolve_warm_jupyter_universal
crates/uv-bench/benches/uv.rs::uv::resolve_warm_jupyter_universal
CodSpeed Performance Gauge
+2%
140 ms137.1 ms
resolve_warm_jupyter
crates/uv-bench/benches/uv.rs::uv::resolve_warm_jupyter
CodSpeed Performance Gauge
+1%
41.8 ms41.5 ms
resolve_warm_airflow
crates/uv-bench/benches/uv.rs::uv::resolve_warm_airflow
CodSpeed Performance Gauge
+1%
463.7 ms460.6 ms
resolve_warm_jupyter_universal
crates/uv-bench/benches/uv.rs::uv::resolve_warm_jupyter_universal
CodSpeed Performance Gauge
-2%
206.4 ms211.5 ms

Ignored

resolve_warm_airflow
crates/uv-bench/benches/uv.rs::uv::resolve_warm_airflow
Ignored
CodSpeed Performance Gauge
0%
805.9 ms804.5 ms

Commits

Click on a commit to change the comparison range
Base
main
10c9355
+1.3%
Add retry logic for "too many open files" errors during Python uninstall When uninstalling many Python installations concurrently (e.g., via `uv python uninstall --all`), the process can exhaust file descriptors and fail with EMFILE ("too many open files") errors. This adds a `remove_dir_all_with_retry` function that retries directory removal operations with exponential backoff when encountering these transient errors. The retry logic uses a 50ms initial delay with up to 10 retries, allowing sufficient time for other concurrent operations to complete and release file descriptors.
5f3655d
3 hours ago
by claude
© 2026 CodSpeed Technology
Home Terms Privacy Docs