python-poetry / python-poetry/poetry

Add common dependency specification per group

Open
#8,138 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature status/triage
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the FAQ and general documentation and believe that my question is not already covered.

Feature Request

It would be handy to have the option to define a common dependency specification for a group.

Instead of

[tool.poetry.group.private.dependencies]
package1 = [ { version = "^2.1.288", source = "PRIVATE_REPO" } ]
package2 = [ { version = "^0.7.0.64", source = "PRIVATE_REPO" } ]
package3 = [ { version = "^0.0.47", source = "PRIVATE_REPO" } ]

[tool.poetry.group.windows.dependencies]
package4 = [ { version = "^1.0.0", platform = "windows", source = "PRIVATE_REPO" } ]
package5 = [ { version = "^1.0.0", platform = "windows", source = "PRIVATE_REPO" } ]
package6 = [ { version = "^1.0.0", platform = "windows", source = "PRIVATE_REPO" } ]

Do this

[tool.poetry.group.private]
source = "PRIVATE_REPO"

[tool.poetry.group.private.dependencies]
package1 = "^2.1.288"
package2 = "^0.7.0.64"
package3 = "^0.0.47"

[tool.poetry.group.windows]
platform = "windows"
source = "PRIVATE_REPO"

[tool.poetry.group.windows.dependencies]
package4 = "^1.0.0"
package5 = "^1.0.0"
package6 = "^1.0.0"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the requested TOML examples and the linked Poetry enhancement guidance. Define how group-level source and platform settings should apply to dependency entries, including expected interactions with existing inline specifications. Done means the feature is implemented with documented behavior and coverage for the private and Windows group examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.