Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Poetry 1.1.0 erroneously warns about out of sync poetry.lock and pyproject.toml #3092

Closed
3 tasks done
TimOrme opened this issue Oct 6, 2020 · 6 comments
Closed
3 tasks done
Labels
kind/bug Something isn't working as expected

Comments

@TimOrme
Copy link
Contributor

TimOrme commented Oct 6, 2020

  • 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

When running the export command in poetry 1.1.0, it raises a warning stating:

Warning: 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.

However, this doesn't seem to be the case, and the same files work fine in poetry 1.0.9, which raises no warning.

This also creates an issue in some automation with export, as were running a command like this:

poetry export -f requirements.txt > requirements.txt

And because the warning is on stdout, it is added to the requirements file, which then causes breakage on pip commands trying to parse that requirements file.

The warning being written to stdout is less of an issue, but would also be nice if export was guaranteed to have clean output.

Thanks!

@TimOrme TimOrme added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Oct 6, 2020
@finswimmer
Copy link
Member

Hello @TimOrme,

whenever you see such warning, you should run poetry lock to make sure, your poetry lock is up to date. Also please update to poetry 1.1.1 Unfortunately there were some bugs in the 1.1.0 release around locking and exporting.

fin swimmer

@TimOrme
Copy link
Contributor Author

TimOrme commented Oct 6, 2020

Running poetry lock seems to have no effect unfortunately. I also see the same issue in 1.1.1 as well.

@TimOrme
Copy link
Contributor Author

TimOrme commented Oct 6, 2020

Here's the console output:

root@ac2833088cb1:/pip-packages# poetry --version
Poetry version 1.1.1
root@ac2833088cb1:/pip-packages# poetry export -f requirements.txt | head
Warning: 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.

Interestingly, I only see this happen in the docker container with debian jesse. I don't see the same issue occur on my mac. It's unclear if thats strictly an OS issue or other dependency in the environment.

@inactivist
Copy link

inactivist commented Nov 22, 2020

@TimOrme

Interestingly, I only see this happen in the docker container with debian jesse. I don't see the same issue occur on my mac. It's unclear if thats strictly an OS issue or other dependency in the environment.

Can you provide a simple Dockerfile that reproduces the issue?

@finswimmer
Copy link
Member

Closing this because we haven't received more information for a long time.

Feel free to leave a comment if you disagree.

@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
Copy link

github-actions bot commented 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.

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

No branches or pull requests

4 participants