Skip to content
Merged
Changes from all 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
3 changes: 1 addition & 2 deletions package-structure-code/python-package-build-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,7 @@ Build your sdist and wheel distributions|✅|Poetry will build your sdist and wh

Some challenges of Poetry include:

- Poetry has its own concept of grouped dependencies (`poetry add --group=GROUP_NAME DEPENDENCY`). Dependencies added as grouped dependencies are not optional and there is no Python standard for this type of dependency. This should not be confused with "optional" dependencies (`poetry add --optional=GROUP_NAME DEPENDENCY`), which is standardised and lets you group your dependencies into several optional groups.
- While Poetry supports "development" dependencies (i.e. dependencies you use for development but not running the code, such as `pytest`), Poetry does not yet follow the standardised format for specifying such dependencies.
- Poetry has its own format for grouped dependencies (`[tool.poetry.group.<name>.dependencies]`), which predates the [dependency groups standard](https://packaging.python.org/en/latest/specifications/dependency-groups/) (PEP 735). Poetry 2.2 and later also support the standard `[dependency-groups]` table, which this guide suggests for [development dependencies](dependency-groups). Grouped dependencies should not be confused with "optional" dependencies (`poetry add --optional=EXTRA_NAME DEPENDENCY`), which are standardised and let you group your dependencies into several optional groups.
- Poetry, by default, pins dependencies using an "upper bound" limit (which is specified with the `^` symbol in the legacy format). However, this behavior can be over-written by specifying the dependency when you use `poetry add` as follows: `poetry add "requests>=2.1"` See breakout below for more discussion on issues surrounding upper-bounds pinning.

Poetry is a popular packaging tool and introduced many very useful features. However, if you decide to use it, then use caution when adding dependencies as Poetry's approach to pinning can be problematic for many builds. If you use Poetry, we strongly suggest that you override the default upper bound dependency option.
Expand Down
Loading