python-poetry / python-poetry/poetry

`poetry lock --no-update` still updates dependencies

Open
#4,288 14 comments 11 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 am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

To recreate, you can run:

pip install requests==2.25.1
poetry lock --no-update

# Updating dependencies
# Resolving dependencies... (39.6s)

I would expect that after running the commands above, I should just see Resolving dependencies... and my lockfile would just have requests 2.25.1. However, what I actually see is that requests gets updated to 2.26.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 reproducing the commands in the issue with the linked pyproject.toml and compare the resulting lockfile, including the requests version. Then trace the implementation of poetry lock --no-update and its dependency resolution behavior; done means the command preserves requests 2.25.1 as expected and the relevant tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.