mirror of https://github.com/astral-sh/uv
Document how to manually update locked package version (#7083)
This PR updates documentation to explicitly mention how to update a specific package with a locked version to a different version. Fixes: https://github.com/astral-sh/uv/issues/7019 --------- Co-authored-by: Zanie Blue <contact@zanie.dev>
This commit is contained in:
parent
d470dfce8e
commit
ae16c4e524
|
|
@ -364,8 +364,30 @@ up-to-date, an error will be raised instead of updating the lockfile.
|
||||||
|
|
||||||
By default, uv will prefer the locked versions of packages when running `uv sync` and `uv lock`.
|
By default, uv will prefer the locked versions of packages when running `uv sync` and `uv lock`.
|
||||||
Package versions will only change if the project's dependency constraints exclude the previous,
|
Package versions will only change if the project's dependency constraints exclude the previous,
|
||||||
locked version. To upgrade to the latest package versions supported by the project's dependency
|
locked version.
|
||||||
constraints, use `uv lock --upgrade`.
|
|
||||||
|
To upgrade all packages:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ uv lock --upgrade
|
||||||
|
```
|
||||||
|
|
||||||
|
To upgrade a single package to the latest version:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ uv lock --upgrade-package <package>
|
||||||
|
```
|
||||||
|
|
||||||
|
To upgrade a single package to a specific version:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ uv lock --upgrade-package <package>==<version>
|
||||||
|
```
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
|
||||||
|
In all cases, upgrades are limited to the project's dependency constraints. For example, if the
|
||||||
|
project defines an upper bound for a package then an upgrade will not go beyond that version.
|
||||||
|
|
||||||
### Limited resolution environments
|
### Limited resolution environments
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue