Deleting the last key under a dotted key in an inline table produces invalid TOML
メンテナーはふだん 2 日以内に返信
評価
調査の方向性
Start by running the reproduction in the issue: tomlkit.parse on an inline table with a dotted key, then del of the inner key, then tomlkit.dumps, and check the result with tomllib.loads. The payload does not name the source file, so find where deletion from an inline table removes the item and its separating comma. Done when the output parses as valid TOML, keeps b as an empty inline table in the middle case, and the leading, trailing and sole-key cases also produce valid output.
索引モデルが issue の本文から書いたものです。
説明
d = tomlkit.parse('t = {a="", b.c=1, d=1}\n'); del d["t"]["b"]["c"]; tomlkit.dumps(d) returns 't = {a="", , d=1}\n'.
tomllib.loads rejects that output ("Invalid initial character for a key part"). Expected valid TOML that still holds b as an empty table, e.g. t = {a="", b = {}, d=1}.
If b.c is the last key you get a trailing comma ({a = 1, }), if it is the first a leading one ({, a = 1}), and if it is the only key the output is {} and b is gone.
- 主要言語
- Python
- スター
- 862
- フォーク
- 193
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 25
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python-poetry/tomlkit のほかの issue
-
Speed up array appends対応中かも @harshitgupta31415 が 1 日前に担当しました。 オープン
難易度 4/5 1〜2日 初心者へのやさしさ 42/100
python-poetry/tomlkit#665 ·
メンテナーはふだん 2 日以内に返信
-
AttributeError on an out-of-order table under an indented header (4+ levels)対応中かも @cig13zs が 1 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 18/100
python-poetry/tomlkit#661 ·
メンテナーはふだん 2 日以内に返信
-
Regression: impossible to dump multiline strings with leading newline対応中かも @shivampwm2020 が 2 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
python-poetry/tomlkit#655 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
In-place array repetition changes values without updating serialized TOML対応中かも @harbinresearcher が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
python-poetry/tomlkit#646 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
tomlkit 0.15.1 fails on out-of-order table header再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
python-poetry/tomlkit#632 ·
メンテナーはふだん 2 日以内に返信
python-poetry/tomlkit の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
noontide-co/mainbranch#1211 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[1.x Bug] run-operation --sql reports success but rolls back writes on transaction-capable adaptersオープンtriage
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
dbt-labs/dbt#16784 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
bug settings ui
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DewaldOosthuizen/py-tray-command-launcher#162 ·
メンテナーはふだん 1 日以内に返信
-
run_all sleeps after the final job despite documenting delays between jobs対応中かも @Gambit-Checkmate が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100