python / python/cpython

Docs: C annotations extension produces invalid docutils tree

Offen
#140,014 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@AA-Turner arbeitet bereits daran.

Seit 12.10.2025.

docs type-bug
Vorherrschende Sprache
Python
Sterne
77.2k
Forks
35.9k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

The function add_annotations in Doc/tools/extensions/c_annotations.py inserts an emphasis node into a desc_content node. This produces an invalid document tree, since the desc_content node is a docutils Element and is not supposed to have children that are text or inline elements. To fix this, the emphasis node needs to be wrapped in a paragraph node.

[…] the validity of the docutils tree is not checked by docutils or Sphinx.

This prevents to build the documentation to PDF with rinohtype.

Linked PRs
  • gh-145838

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.