Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify that poetry update only updates main dependencies #9857

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ you should use the `update` command.
poetry update
```

This will resolve all dependencies of the project and write the exact versions into `poetry.lock`.
This will resolve all dependencies of the project, write the exact versions into `poetry.lock`,
and subsequently update the main dependencies.

If you just want to update a few packages and not all, you can list them as such:

Expand Down Expand Up @@ -310,6 +311,11 @@ You can do this using the `add` command.
When `--only` is specified, `--with` and `--without` options are ignored.
{{% /note %}}

{{% note %}}
`poetry update` without any options will only update the main dependencies of the project.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is pedantically not correct - non-optional dependency groups are also updated, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is probably right than non-optional dependency groups are also updated, although I have not tested this; updated, thanks.

Optional dependency groups are only updated when they are specified through `--with`.
{{% /note %}}

## add

The `add` command adds required packages to your `pyproject.toml` and installs them.
Expand Down