python-poetry / python-poetry/poetry
Using `@latest` should not change the constraint pattern
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
- [X ] I am on the latest Poetry version.
- [X ] I have searched the issues of this repo and believe that this is not a duplicate.
- OS version and name: Ubuntu 18.04
- Poetry version: 1.1.4
Issue
According to the docs, to upgrade to the latest version of a package you already have, for example Flask, you can do: poetry add Flask@latest. The issue is that it changes the constraint you have. So if you start with:
Flask = "1.1.1"
in your pyproject.toml, it'll change it to:
Flask = "^1.1.2"
I would expect it to not add the ^. This expected behavior matches npm. Doing npm install typescript@latest changes "typescript": "3.8.3" to "typescript": "4.1.3".
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 with the poetry add Flask@latest behavior described in the issue and reproduce it using the provided pyproject.toml constraint. Trace the add CLI handling for the @latest specifier, then verify that upgrading the package changes only the version and preserves the existing constraint pattern.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100