Skip to content

Conversation

gmilde
Copy link

@gmilde gmilde commented Sep 9, 2025

Set the "parent" attribute of RSTState instances to the document instead of None. The attribute holds the state machines "current node" which is initialized to the document in RSTStateMachine.run() and required since Docutils 0.22.1 in RSTState.nested_parse() to correctly support sections in nested parsing.

Purpose

Get tests with Docutils HEAD working again.

Set the "parent" attribute of RSTState instances to the `document`
instead of None.  The attribute holds the state machines "current node"
which is initialized to the `document` in `RSTStateMachine.run()` and
required since Docutils 0.22.1 in `RSTState.nested_parse()` to correctly
support sections in nested parsing.
@gmilde
Copy link
Author

gmilde commented Sep 10, 2025

@jfbu
Copy link
Contributor

jfbu commented Sep 21, 2025

I have relaunched Python 3.14 (Docutils 0.22) test to confirm it still passes, now that PyPi has Docutils 0.22.2.

@gmilde
Copy link
Author

gmilde commented Sep 21, 2025

I have relaunched Python 3.14 (Docutils 0.22) test to confirm it still passes, now that PyPi has Docutils 0.22.2.

Thanks for confirming.

Looking at https://github.com/sphinx-doc/sphinx/actions/runs/17890838608/job/50870951193, I see that now Docutils 0.22 tests now fail, too, with the same false negative.
This is expected with 0.22.1 as well as 0.22.2 and can be solved with the proposed patch.

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.

2 participants