You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Update version number in pyproject.toml and update lock file without dependency resolution #5812
When performing a release of my library or application, I typically bump the version number in pyproject.toml.
However, that means the lockfile is now out of sync (as it includes a content-hash of pyproject.toml). The only way to resolve is to re-run poetry lock, or to compute the content-hash myself and update poetry.lock manually 🤮.
If I choose to apply poetry lock, dependency resolution is performed, but I don't want to do that right before a release of my software!
Is there a command or option that I'm overlooking to deal with this situation?
I have searched the issues of this repo and believe that this is not a duplicate.
I have searched the documentation and believe that my question is not covered.
Activity
dimbleby commentedon Jun 9, 2022
You have checked the "I have searched the documentation" box, but have you really?
poetry lockhas exactly one option and it does what you want.Korijn commentedon Jun 9, 2022
I did, but not well enough. I'm sorry!
(For future readers: it's
poetry lock --no-update)Korijn commentedon Jun 9, 2022
Well, I just tried that, but it still changes the locked versions of packages. I'm using poetry v1.1.12. Reopening.
Small portion of git diff output:
Ironically, the content-hash of
pyproject.tomlwas not updated.To be clear, all I've changed in
pyproject.tomlis this:Does this become a bug report at this point?
Actually it might be #4618 because celery has extras and its the only package being changed...
dimbleby commentedon Jun 9, 2022
Sounds like a duplicate then, if so then it looks as though it should be fixed in the latest beta
Korijn commentedon Jun 9, 2022
Would you expect the content hash to be updated? That part is not captured in #4618
radoering commentedon Jun 9, 2022
The content hash does not include every part of
pyproject.toml. If I remember correctly, only dependency sections are considered.Korijn commentedon Jun 9, 2022
Ahh! That makes sense. OK thanks!
Closing as duplicate.
github-actions commentedon Mar 2, 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.