python-poetry / python-poetry/poetry
`poetry add` should not install dependencies from groups previously excluded using `--without`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
- Poetry version: 1.7.1
- Python version: 3.11
- OS version and name: Windows 11
- [ x] I am on the latest stable Poetry version, installed using a recommended method.
- [x ] I have searched the issues of this repo and believe that this is not a duplicate.
- [x ] I have consulted the FAQ and blog for any relevant entries or release notes.
Issue
I previously excluded a group from poetry install, e.g.
poetry install --without my-optional-group
I then add a package to the main group with:
poetry add new-package
This installs all of the dependencies in my-optional-group before it installs new-package. Is this a bug or expected behaviour? How do I add just new-package still excluding all of the dependencies in my-optional-group that I don't want?
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
Start by reproducing the sequence with poetry install --without my-optional-group followed by poetry add new-package on Poetry 1.7.1 and Python 3.11. Trace the install and add command entry points and their tests; done means adding the package does not install dependencies from the previously excluded group.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100