Skip to content

Commit

Permalink
docs: mention the different types of exact specifications and pep440
Browse files Browse the repository at this point in the history
  • Loading branch information
KotlinIsland authored and radoering committed Feb 25, 2023
1 parent c8945eb commit cf3b0c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/dependency-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,15 @@ Multiple version requirements can also be separated with a comma, e.g. `>= 1.2,

You can specify the exact version of a package.

`==1.2.3` is an example of an exact version specification.
`1.2.3` is an example of an exact version specification.

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.

Exact versions can also be specified with `==` according to [PEP 440](https://peps.python.org/pep-0440/).

`==1.2.3` is an example of this.

### Using the `@` operator

When adding dependencies via `poetry add`, you can use the `@` operator.
Expand Down

0 comments on commit cf3b0c0

Please sign in to comment.