uv/crates/uv-python/src
konsti 62bf92132b
Add a 5 min default timeout for deadlocks (#16342)
When a process is running and another calls `uv cache clean` or `uv
cache prune` we currently deadlock - sometimes until the CI timeout
(https://github.com/astral-sh/setup-uv/issues/588). To avoid this, we
add a default 5 min timeout waiting for a lock. 5 min balances allowing
in-progress builds to finish, especially with larger native
dependencies, while also giving timely errors for deadlocks on (remote)
systems.

Commit 1 is a refactoring.

This branch also fixes a problem with the logging where acquired and
released resources currently mismatch:

```
DEBUG Acquired lock for `https://github.com/tqdm/tqdm`
DEBUG Using existing Git source `https://github.com/tqdm/tqdm`
DEBUG Released lock at `C:\Users\Konsti\AppData\Local\uv\cache\git-v0\locks\16bb813afef8edd2`
```
2025-12-04 14:59:04 +01:00
..
sysconfig Sync latest Python releases (#16792) 2025-11-20 20:27:40 +00:00
discovery.rs Allow Python requests to include `+gil` to require a GIL-enabled interpreter (#16537) 2025-11-03 13:35:52 -06:00
downloads.rs Support http/https URLs in `uv python --python-downloads-json-url` (#16542) 2025-11-14 17:51:24 -05:00
environment.rs Add a 5 min default timeout for deadlocks (#16342) 2025-12-04 14:59:04 +01:00
implementation.rs Allow selection of pyodide interpreters with "pyodide" (#15256) 2025-08-13 19:08:55 +00:00
installation.rs Support http/https URLs in `uv python --python-downloads-json-url` (#16542) 2025-11-14 17:51:24 -05:00
interpreter.rs Add a 5 min default timeout for deadlocks (#16342) 2025-12-04 14:59:04 +01:00
lib.rs chore(🧹): const env var usage cleanup (#16950) 2025-12-02 22:16:46 -08:00
macos_dylib.rs Install and remove managed Python to and from the Windows Registry (PEP 514) (#10634) 2025-01-23 14:13:41 +00:00
managed.rs Add a 5 min default timeout for deadlocks (#16342) 2025-12-04 14:59:04 +01:00
microsoft_store.rs Bump MSRV to 1.85 and Edition 2024 (#13516) 2025-05-18 19:38:43 -04:00
pointer_size.rs Change "toolchain" to "python" (#4735) 2024-07-03 07:44:29 -05:00
prefix.rs Add `uv-` prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
python_version.rs Allow pinning managed Python versions to specific build versions (#15314) 2025-08-25 16:25:05 -05:00
target.rs Add `uv-` prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
version_files.rs Make the use of `Self` consistent. (#15074) 2025-08-05 20:17:12 +01:00
virtualenv.rs Fix pixi environment detection by recognizing Conda prefixes with `conda-meta/pixi` (#16585) 2025-11-09 22:16:17 -06:00
windows_registry.rs Treat deleted Windows registry keys as equivalent to missing ones (#16194) 2025-10-08 12:24:36 -05:00