Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ You also can specify a constraint when adding a package, like so:
```bash
poetry add pendulum@^2.0.5
poetry add "pendulum>=2.0.5"
poetry add "pendulum==2.0.5"
```

If you try to add a package that is already present, you will get an error.
Expand Down
11 changes: 7 additions & 4 deletions docs/dependency-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,18 @@ Here are some examples of inequality requirements:
!= 1.2.3
```

#### Multiple requirements

Multiple version requirements can also be separated with a comma, e.g. `>= 1.2, < 1.5`.

### Exact requirements

You can specify the exact version of a package.
This will tell Poetry to install this version and this version only.
If other dependencies require a different version, the solver will ultimately fail and abort any install or update procedures.

#### Multiple requirements
`==1.2.3` is an example of an exact version specification.

Multiple version requirements can also be separated with a comma, e.g. `>= 1.2, < 1.5`.
This will tell Poetry to install this version and this version only.
If other dependencies require a different version, the solver will ultimately fail and abort any install or update procedures.

## `git` dependencies

Expand Down