python-poetry / python-poetry/poetry
'poetry add some_pkg[extra]' overrides existing extras
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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