Add optional dependencies section to the lockfile document (#6982)

Closes https://github.com/astral-sh/uv/issues/6729
This commit is contained in:
Zanie Blue 2024-09-03 18:37:36 -05:00 committed by GitHub
parent 71d9ecd644
commit 614839e88b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 0 deletions

View File

@ -343,6 +343,19 @@ Entries in the `environments` setting must be disjoint (i.e., they must not over
`sys_platform == 'darwin'` and `python_version >= '3.9'` are not, since both could be true at the `sys_platform == 'darwin'` and `python_version >= '3.9'` are not, since both could be true at the
same time. same time.
### Optional dependencies
uv requires that all optional dependencies ("extras") declared by the project are compatible with
each other and resolves all optional dependencies together when creating the lockfile.
If optional dependencies declared in one group are not compatible with those in another group, uv
will fail to resolve the requirements of the project with an error.
!!! note
There is currently no way to declare conflicting optional dependencies. See
[astral.sh/uv#6981](https://github.com/astral-sh/uv/issues/6981) to track support.
## Managing dependencies ## Managing dependencies
uv is capable of adding, updating, and removing dependencies using the CLI. uv is capable of adding, updating, and removing dependencies using the CLI.