Skip to content

fix: issue with tomlkit 0.7.2#346

Closed
browniebroke wants to merge 4 commits into
python-semantic-release:masterfrom
browniebroke:fix/tomlkit-update
Closed

fix: issue with tomlkit 0.7.2#346
browniebroke wants to merge 4 commits into
python-semantic-release:masterfrom
browniebroke:fix/tomlkit-update

Conversation

@browniebroke
Copy link
Copy Markdown
Contributor

@browniebroke browniebroke commented Jun 9, 2021

Comment on lines +251 to +263
"""
[tool.poetry]
name = "my-package"
version = "0.1.0"
description = "A super package"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.semantic_release]
version_toml = "pyproject.toml:tool.poetry.version"
"""
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dug into this, but I can't find an appropriate fix in PSR. I tried to update it via tomlkit only, and it works, but tomlkit + dotty-dict seems to be the problem.

One thing to note is that this is a case of an out-of-order table, which is discouraged by the TOML spec:

Defining tables out-of-order is discouraged.

# VALID BUT DISCOURAGED
[fruit.apple]
[animal]
[fruit.orange]
# RECOMMENDED
[fruit.apple]
[fruit.orange]
[animal]

If the table is as recommended in the specs, the test passes.

@browniebroke browniebroke deleted the fix/tomlkit-update branch June 10, 2021 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant