-
Notifications
You must be signed in to change notification settings - Fork 219
⬆️ Allow docutils 0.22 #1084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
⬆️ Allow docutils 0.22 #1084
Conversation
There was a problem hiding this 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.22to<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.
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:
<0.22to<0.23normalize_doctree_xml()function to handle cross-version XML serialization differencesNote, one issue was found and raised upstream: sphinx-doc/sphinx#14261