mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Document that uv is safe to run concurrently (#2818)
Closes https://github.com/astral-sh/uv/issues/2730.
This commit is contained in:
parent
dd3009ad84
commit
661787b0cb
1 changed files with 12 additions and 2 deletions
14
README.md
14
README.md
|
@ -261,8 +261,18 @@ The specifics of uv's caching semantics vary based on the nature of the dependen
|
|||
- **For Git dependencies**, uv caches based on the fully-resolved Git commit hash. As such,
|
||||
`uv pip compile` will pin Git dependencies to a specific commit hash when writing the resolved
|
||||
dependency set.
|
||||
- **For local dependencies**, uv caches based on the last-modified time of the `setup.py` or
|
||||
`pyproject.toml` file.
|
||||
- **For local dependencies**, uv caches based on the last-modified time of the source archive (i.e.,
|
||||
the local `.whl` or `.tar.gz` file). For directories, uv caches based on the last-modified time of
|
||||
the `pyproject.toml`, `setup.py`, or `setup.cfg` file.
|
||||
|
||||
It's safe to run multiple `uv` commands concurrently, even against the same virtual environment.
|
||||
uv's cache is designed to be thread-safe and append-only, and thus robust to multiple concurrent
|
||||
readers and writers. uv applies a file-based lock to the target virtual environment when installing,
|
||||
to avoid concurrent modifications across processes.
|
||||
|
||||
Note that it's _not_ safe to modify the uv cache directly (e.g., `uv cache clean`) while other `uv`
|
||||
commands are running, and _never_ safe to modify the cache directly (e.g., by removing a file or
|
||||
directory).
|
||||
|
||||
If you're running into caching issues, uv includes a few escape hatches:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue