-
Notifications
You must be signed in to change notification settings - Fork 219
⬆️ Support Sphinx v9 #1076
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
⬆️ Support Sphinx v9 #1076
Conversation
for more information, see https://pre-commit.ci
|
Currently, the major blocker appears to be that this function no longer seems to work properly: MyST-Parser/myst_parser/mdit_to_docutils/base.py Lines 1884 to 1929 in 59d5384
It leads to: Not sure what has changed to affect this yet, feedback / help welcome? |
|
@chrisjsewell Fairly sure this is a Docutils change rather than Sphinx. Notably Docutils doesn't seem to use Docutils currently uses the below code to add meta nodes: Could you do similar here? A |
@AA-Turner the only change in dependencies is sphinx 8.2.3 to 9.0.4 (plus the addition of roman-numerals==4.0.0), the docutils version remains the same at 0.21.2 (docutils is stilled pinned <0.22) is there anything you can think of that would change how docutils is initalised? |
@AA-Turner perhaps it is something to do with sphinx-doc/sphinx#13673 |
|
I noticed in the CI logs above, that the combination of Python 3.14 and Sphinx 9.0.4 does seem to pass on Windows for some reason: https://github.com/executablebooks/MyST-Parser/actions/runs/20259242759/job/58167505565?pr=1076 does this mean there might be some Python version and Sphinx interaction? |
It's not actually passing, if you look in the log, it's an issue in the windows job step, that I've seen before; it doesn't "fail-fast" like Linux and takes the fact that the |
Ah, well, makes sense. It did seem unusual that the failure would be platform dependent. So it's back to being a sphinx issue. |
|
|
@chrisjsewell I believe the error is fixed with sphinx-doc/sphinx#14194. However, I would strongly suggest not using A |
Thanks! will try it out soon
I didn't actually write this bit of code originally 😅 , so absolutely open to other solutions from you or anyone 👍
|
|
@AA-Turner |
|
What's the new error? A |
|
@chrisjsewell I've opened #1080 for the meta nodes. I believe the remaining failures are caused by the tests themselves. Sphinx has stopped using The A |
|
Is there any update on the progress? @chrisjsewell: I see @AA-Turner proposed a pull request: #1080 |
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 adds support for Sphinx version 9 while maintaining backward compatibility with Sphinx 8. The changes update dependency specifications, test configurations, and test fixtures to accommodate behavioral differences between the two Sphinx versions.
Changes:
- Updated Sphinx version constraints from
<9to<10in dependencies - Added Sphinx 9 to the test matrix and tox environments
- Updated test fixtures and test code to handle differences in Sphinx 8 vs 9 output
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Updated Sphinx dependency constraint and pinned sphinx-pytest version |
| tox.ini | Added Sphinx 9 to test environments |
| .github/workflows/tests.yml | Added Sphinx 9 to CI test matrix and reorganized test commands |
| tests/test_renderers/test_fixtures_sphinx.py | Added compatibility handling for Sphinx 9 transformer and output format changes |
| tests/test_renderers/fixtures/sphinx_syntax_elements.md | Updated expected output for image elements with Sphinx 9 attributes |
| tests/test_renderers/fixtures/sphinx_roles.md | Updated expected output for JavaScript class role |
| tests/test_renderers/fixtures/sphinx_directives.md | Simplified skip markers by removing SPHINX4-SKIP prefix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
nearly there, just have to fix some surfaced windows errors with snapshot tests |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This PR adds support for Sphinx version 9 while maintaining backward compatibility with Sphinx 8. The changes update dependency specifications, test configurations, and test fixtures to accommodate behavioral differences between the two Sphinx versions.
Changes:
<9to<10in dependencies