Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
3 tasks done
samestep opened this issue Feb 9, 2021 · 2 comments · Fixed by #5718
Closed
3 tasks done

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

samestep opened this issue Feb 9, 2021 · 2 comments · Fixed by #5718
Labels
kind/bug Something isn't working as expected

Comments

@samestep
Copy link

samestep commented Feb 9, 2021

  • 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.

@samestep samestep added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 9, 2021
@getup8
Copy link

getup8 commented Dec 25, 2021

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?

Copy link

github-actions bot commented Mar 1, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants