Skip to content

poetry remove --dry-run modifies poetry.lock #3666

Closed

Description

@samestep
  • 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

As the title states, running poetry remove --dry-run modifies poetry.lock. Example:

poetry new remove-dry-run-bug
cd $_
sed -i '' 's/^authors = \[".*"\]/authors = []/' pyproject.toml
cat pyproject.toml # see gist
poetry add pyyaml
cp poetry.lock{,.old}
poetry remove --dry-run pyyaml
git diff --no-index poetry.lock{.old,} | tee poetry.lock.diff # see gist

This causes subsequent commands (such as poetry show) to fail.

Activity

  1. added
    kind/bugSomething isn't working as expected
    status/triageThis issue needs to be triaged
    on Feb 9, 2021
  2. getup8 commented on Dec 25, 2021

    @getup8

    Yeah I'm on the latest version of poetry and just ran:

    poetry add djangorestframework@latest --dry-run just to test what it would do and it updated poetry.lock (it did not update the actual package locally).

    This seems pretty bad no?

  3. github-actions commented on Mar 1, 2024

    @github-actions

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  4. locked as resolved and limited conversation to collaborators on Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions