Skip to content

Conversation

@chrisjsewell
Copy link
Member

@chrisjsewell chrisjsewell commented Jan 15, 2026

This PR updates the project to support docutils 0.22 by adapting to breaking changes in how docutils serializes boolean attributes and line numbers. The changes ensure test compatibility across docutils versions 0.20-0.22.

Changes:

  • Updated docutils version constraint from <0.22 to <0.23
  • Introduced normalize_doctree_xml() function to handle cross-version XML serialization differences
  • Updated test fixtures to reflect docutils 0.22's line numbering changes

Note, one issue was found and raised upstream: sphinx-doc/sphinx#14261

@chrisjsewell chrisjsewell requested a review from Copilot January 15, 2026 08:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the project to support docutils 0.22 by adapting to breaking changes in how docutils serializes boolean attributes and line numbers. The changes ensure test compatibility across docutils versions 0.20-0.22.

Changes:

  • Updated docutils version constraint from <0.22 to <0.23
  • Introduced normalize_doctree_xml() function to handle cross-version XML serialization differences
  • Updated test fixtures to reflect docutils 0.22's line numbering changes

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
pyproject.toml Updated docutils version constraint and added pytest warning filter
tests/conftest.py Added normalize_doctree_xml() function for cross-version compatibility
myst_parser/mocking.py Added handling for docutils 0.22's integer number-lines option
tests/test_sphinx/conftest.py Applied normalization to doctree formatting
tests/test_sphinx/test_sphinx_builds.py Applied normalization and added import
tests/test_renderers/*.py Applied normalization across all renderer tests
tests/test_html/test_html_to_nodes.py Applied normalization to HTML node tests
tests/test_renderers/fixtures/*.txt Updated test fixtures for docutils 0.22 behavior
tests/test_sphinx/sourcedirs/includes/index.md Changed line numbering from 0 to 1
tests/test_sphinx/test_sphinx_builds/test_includes.* Updated expected output for new line numbering
AGENTS.md Added documentation note and docutils release log link
.github/workflows/tests.yml Added docutils 0.22 to test matrix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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