-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Inconsistent Indentation in Lock File #6201
Comments
you probably need to take this one up with tomlkit if you can reproduce it (which I can't) |
I am able to reproduce on [tool.poetry]
name = "foo"
version = "0.0.1"
description = ""
authors = []
[tool.poetry.dependencies]
python = "^3.9" Which generates the following package = []
[metadata]
lock-version = "1.1"
python-versions = "^3.9"
content-hash = "c595a0588c25d58f3e3834ad7169126836d262b925fe6ca9b5d540dcf301d254"
[metadata.files] The issue lies under the fact than here in
I wonder if we should not make sure to convert the attributes in |
nice find. In the unlikely event of finding (i) time and (ii) consensus, I'd happily abandon tomlkit. (With the possible of exception of the Certainly for However I don't imagine that either (i) or (ii) is going to happen. |
If we confirm that Obviously, since this is an important change and it requires a consensus, this would not come before |
Thank you for jumping on this issue so quickly. To summarize the workaround for the benefit of those following along, remove all indentation from |
I'm not sure why it doesn't consistently produce the extra indentation, but the |
Closing, since the bug was caused by the use of |
I don't think that's correct reasoning, tomlkit is still used to write the poetry.lock file. (I haven't checked whether this bug is still present or not) |
@dimbleby, I just verified that the bug is fixed in Poetry 1.5.0 and not Poetry 1.4.2 as expected. |
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. |
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).OS version and name: Ubuntu 20.04 LTS
Poetry version: 1.1.14
Link to the contents of your pyproject.toml file: pyproject.toml
Issue
poetry lock --no-update
produces inconsistent output on the samepyproject.toml
. When run locally on Ubuntu 22.04 LTS,poetry lock --no-update
continues to consistently produce this poetry.lock. This is consistent with past runs on Ubuntu 22.04 LTS in CI and hence what I perceive to be the correct output. Here is a CI workflow on Ubuntu 20.04 LTS showing the diff (reproduced below) between the old (correct) and new (incorrect) output. The new output appears consistent across CI runs. Note that the new order of lines within[package.extras]
is reverse alphabetical order, and the new order of dependencies within each line is reversed with respect to the original order. Both of those sorting issues were the focus of the closely related issue #6153 and have already been addressed (but not yet released) in #6169. The focus of this issue is the two spaces added beforemetadata.python-versions
.The text was updated successfully, but these errors were encountered: