python-poetry / python-poetry/poetry

'poetry add some_pkg[extra]' overrides existing extras

Open
#2,636 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

  • OS version and name: Ubuntu 18.04
  • Poetry version: 1.0.9

How to Reproduce

$ poetry init
...

$ poetry add boto3-stubs[cloudwatch]
$ poetry add boto3-stubs[s3]
What I got

pyproject.toml (only the dependencies section is relevant):

[tool.poetry.dependencies]
python = "^3.8"
boto3-stubs = {extras = ["s3"], version = "^1.14.16"}
What I expected

pyproject.toml (only the dependencies section is relevant):

[tool.poetry.dependencies]
python = "^3.8"
boto3-stubs = {extras = ["s3", "cloudwatch"], version = "^1.14.16"}

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

Reproduce the two poetry add commands and inspect the resulting dependency entry in pyproject.toml. Trace the add-command handling for repeated extras, then verify that adding a second extra preserves the first and produces the combined s3 and cloudwatch list.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.