{"id":1130,"hash":"544efea944a48acda0a435e0e7e767797aefbfb2ec75f8cbe2d2b26fae44b38c","pattern":"Warning: The lock file is not up to date with the latest changes in pyproject.toml","full_message":"When I am using a poetry command with Python 3.7, in my case:\n\npoetry export -f requirements.txt\n\nI am getting the following error:\n\nWarning: The lock file is not up to date with the latest changes in pyproject.toml. You may be getting outdated dependencies. Run update to update them.\n\nSo far clear, but if I run poetry update it upgrades my dependencies, which is not what I want at this time for my project. If I run poetry lock instead, it still upgrades dependencies.\n\nHow can I work around this?","ecosystem":"pypi","package_name":"python-poetry","package_version":null,"solution":"UPDATE V2.0.0 (released date : 4 jan 2025) :\nThe --no-update option does no longer exist (see V2 docs).\nThe same documentation says:\n\nBy default, packages that have already been added to the lock file\nbefore will not be updated.\n\nSo now just use: poetry lock or downgrade you poetry version to use the solution below:\n\nFormer answer (before Poetry V2.0.0 release):\nThis is a known issue in Poetry.\n\nThe issue is resolved, use: poetry lock --no-update.\n\nOld answer:\nThere is a current workaround with the following commands:\n\npoetry add pathlib2\npoetry remove pathlib2\n\nWhere pathlib2 is any library you don't already depend on and that has no dependencies on it's own, hence pathlib2.\n\nUsing these commands will rewrite the lockfile hashes and resolve the file conflict without upgrading any of the other packages used in the project.","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/62040724/warning-the-lock-file-is-not-up-to-date-with-the-latest-changes-in-pyproject-to","votes":29,"created_at":"2026-04-19T04:52:24.096354+00:00","updated_at":"2026-04-19T04:52:24.096354+00:00"}