Skip to content

Commit

Permalink
minor changes in dependency spec example
Browse files Browse the repository at this point in the history
  • Loading branch information
venaturum committed Sep 23, 2022
1 parent 3e2c623 commit eee933e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/dependency-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,15 +301,15 @@ pathlib2 = { version = "^2.2", markers = "python_version <= '3.4' or sys_platfor
Sometimes, one of your dependency may have different version ranges depending
on the target Python versions.

Lets say you have a dependency on the package foo which is only compatible
with Python >=3.6,<3.8 up to version 1.9 and compatible with Python 3.8+ from version 2.0:
Let's say you have a dependency on the package `foo` which is only compatible
with Python 3.6-3.7 up to version 1.9, and compatible with Python 3.8+ from version 2.0:
you would declare it like so:

```toml
[tool.poetry.dependencies]
foo = [
{version = "<=1.9", python = "^3.6"},
{version = "^2.0", python = "^3.8"}
{version = "<=1.9", python = ">=3.6,<3.8"},
{version = "^2.0", python = ">=3.8"}
]
```

Expand Down

0 comments on commit eee933e

Please sign in to comment.