From 0ca1380602f255d11a4dec4c52d0c4f9c17aea2b Mon Sep 17 00:00:00 2001 From: Simon van Lierde Date: Tue, 13 Oct 2026 05:28:25 +0200 Subject: [PATCH 1/2] docs: update Poetry dependency groups for PEP 735 The Poetry challenges said there is no standard for grouped or development dependencies. PEP 735 dependency groups are that standard, the guide already recommends them, and Poetry supports them since 2.2. --- package-structure-code/python-package-build-tools.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package-structure-code/python-package-build-tools.md b/package-structure-code/python-package-build-tools.md index cd13fbec..3a13b165 100644 --- a/package-structure-code/python-package-build-tools.md +++ b/package-structure-code/python-package-build-tools.md @@ -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..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=GROUP_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. From 78de9690a33052759c265dd18e9af1a793ea6b06 Mon Sep 17 00:00:00 2001 From: Simon van Lierde <90462640+simonvanlierde@users.noreply.github.com> Date: Wed, 14 Oct 2026 13:23:31 +0200 Subject: [PATCH 2/2] Update package-structure-code/python-package-build-tools.md Co-authored-by: Inessa Pawson --- package-structure-code/python-package-build-tools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-structure-code/python-package-build-tools.md b/package-structure-code/python-package-build-tools.md index 3a13b165..c324a3ff 100644 --- a/package-structure-code/python-package-build-tools.md +++ b/package-structure-code/python-package-build-tools.md @@ -414,7 +414,7 @@ Build your sdist and wheel distributions|✅|Poetry will build your sdist and wh Some challenges of Poetry include: -- Poetry has its own format for grouped dependencies (`[tool.poetry.group..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=GROUP_NAME DEPENDENCY`), which are standardised and let you group your dependencies into several optional groups. +- Poetry has its own format for grouped dependencies (`[tool.poetry.group..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.