Skip to content

docs: clarify extras with per-group package extras - #11060

Open
muhammadbinriaz wants to merge 1 commit into
python-poetry:mainfrom
muhammadbinriaz:docs/extras-with-dependency-groups
Open

docs: clarify extras with per-group package extras#11060
muhammadbinriaz wants to merge 1 commit into
python-poetry:mainfrom
muhammadbinriaz:docs/extras-with-dependency-groups

Conversation

@muhammadbinriaz

Copy link
Copy Markdown

Summary

Documents that re-declaring a main optional dependency inside a dependency group can add extra package extras for local installs, and that Poetry combines those extras when both the group and the project extra are selected.

Also clarifies the existing note: extras entries must still name packages from the project's main dependencies (not packages that exist only in a group).

Closes #8581.

Checklist

  • Docs only (no code changes)

The extras docs said dependency-group packages cannot be used as extras,
which is still true for naming them in [tool.poetry.extras]. What was
missing is that re-declaring the same main dependency in a group can add
extra package extras for local installs, and Poetry combines them when
both the group and the project extra are selected.

Document that pattern (with a "*" version tip) so the current behavior
is intentional and discoverable. Closes python-poetry#8581.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

group-specific updates to extras work: unintended, or undocumented?

1 participant