Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Deleting the last key under a dotted key in an inline table produces invalid TOML

Aperta
#662 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@cig13zs ci sta già lavorando.

Dal 15/10/2026.

  • #664 di @cig13zs — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
data

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
862
Fork
193
Merge medio
4g 2h
PR unite (30g)
25

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python-poetry/tomlkit

Tutte le issue di python-poetry/tomlkit

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.