Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

tomlkit 0.15.1 fails on out-of-order table header

Abierto
#632 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

  • #636 de @0xrutabaga — cerrado sin fusionar

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
tooling

Línea de trabajo

Reproduce with the given document: tomlkit.loads fails with Key "b" already exists while tomllib.loads succeeds. Start from tomlkit's table/key parsing path (the loads entry point and how dotted keys and later [a.b.e] headers merge into an existing [a] table). Done when that document and similar out-of-order headers parse without error and round-trip without changing unrelated style.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

tomlkit 0.15.1 and earlier fail to parse out-of-order table header. The following example is valid TOML and loads fine with stdlib tomllib.

import tomllib, tomlkit

doc = """\
[a]
b.c = 1
b.d = 2

[x]
y = 1

[a.b.e]
f = 3
"""

tomllib.loads(doc)   # OK
tomlkit.loads(doc)   # ParseError: Key "b" already exists. at line 9 col 0

We noticed this problem while parsing the pyproject.toml file of geventhttpclient-2.5.0 https://raw.githubusercontent.com/geventhttpclient/geventhttpclient/refs/tags/2.5.0/pyproject.toml . See https://github.com/python-wheel-build/fromager/issues/1356

Lenguaje dominante
Python
Estrellas
859
Forks
186
Merge medio
4 d 14 h
PR fusionados (30 d)
22

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de python-poetry/tomlkit

Todos los issues de python-poetry/tomlkit

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.