diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 74118fe8..75680e55 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,18 +26,15 @@ jobs: fail-fast: false matrix: python-version: ["3.11", "3.12", "3.13", "3.14"] - sphinx: [">=8,<9"] + sphinx: [">=8,<9", ">=9,<10"] os: [ubuntu-latest] include: - # - os: ubuntu-latest - # python-version: "3.11" - # sphinx: ">=7,<8" - os: windows-latest python-version: "3.11" sphinx: ">=8,<9" - os: windows-latest python-version: "3.14" - sphinx: ">=8,<9" + sphinx: ">=9,<10" runs-on: ${{ matrix.os }} diff --git a/pyproject.toml b/pyproject.toml index c2ffb213..c83610ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "markdown-it-py~=4.0", "mdit-py-plugins~=0.5", "pyyaml", - "sphinx>=8,<9", + "sphinx>=8,<10", ] [project.urls] diff --git a/tests/test_renderers/fixtures/sphinx_directives.md b/tests/test_renderers/fixtures/sphinx_directives.md index 357ba114..99370f05 100644 --- a/tests/test_renderers/fixtures/sphinx_directives.md +++ b/tests/test_renderers/fixtures/sphinx_directives.md @@ -386,7 +386,7 @@ term 2 : B Definition of both terms. . -SPHINX4-SKIP productionlist (`sphinx.domains.std.ProductionList`): +SKIP productionlist (`sphinx.domains.std.ProductionList`): . ```{productionlist} try_stmt: try1_stmt | try2_stmt ``` @@ -426,7 +426,7 @@ rst:directive (`sphinx.domains.rst.ReSTDirective`): . -SPHINX4-SKIP rst:directive:option (`sphinx.domains.rst.ReSTDirectiveOption`): +SKIP rst:directive:option (`sphinx.domains.rst.ReSTDirectiveOption`): . ```{rst:directive:option} a ``` diff --git a/tests/test_renderers/fixtures/sphinx_syntax_elements.md b/tests/test_renderers/fixtures/sphinx_syntax_elements.md index 1f6e1fcb..37a518ff 100644 --- a/tests/test_renderers/fixtures/sphinx_syntax_elements.md +++ b/tests/test_renderers/fixtures/sphinx_syntax_elements.md @@ -169,7 +169,7 @@ Image empty: . - + . Image with alt and title: @@ -178,7 +178,7 @@ Image with alt and title: . - alt + alt . Image with escapable html: @@ -187,7 +187,7 @@ Image with escapable html: . - alt + alt . Block Quote: diff --git a/tests/test_renderers/test_fixtures_sphinx.py b/tests/test_renderers/test_fixtures_sphinx.py index 32e3c189..3b5a4ca4 100644 --- a/tests/test_renderers/test_fixtures_sphinx.py +++ b/tests/test_renderers/test_fixtures_sphinx.py @@ -34,10 +34,16 @@ def _apply_transforms(self): result = sphinx_doctree(file_params.content, "index.md") pformat = result.pformat("index") - # changed in docutils 0.20.1 - pformat = pformat.replace( - '', '' - ) + replacements = { + # changed in docutils 0.20.1 + '': '', + # changed in sphinx 9 + '': '', + 'alt': 'alt', + 'alt': 'alt', + } + for old, new in replacements.items(): + pformat = pformat.replace(old, new) file_params.assert_expected(pformat, rstrip_lines=True) @@ -89,9 +95,7 @@ def test_sphinx_directives( ): # TODO fix skipped directives # TODO test domain directives - if file_params.title.startswith("SKIP") or file_params.title.startswith( - "SPHINX4-SKIP" - ): + if file_params.title.startswith("SKIP"): pytest.skip(file_params.title) sphinx_doctree_no_tr.set_conf({"extensions": ["myst_parser"]}) diff --git a/tox.ini b/tox.ini index cd87af04..1a18f9f8 100644 --- a/tox.ini +++ b/tox.ini @@ -11,12 +11,12 @@ # then then deleting compiled files has been found to fix it: `find . -name \*.pyc -delete` [tox] -envlist = py311-sphinx8 +envlist = py311-sphinx9 [testenv] usedevelop = true -[testenv:py{311,312,313,314}-sphinx{8}] +[testenv:py{311,312,313,314}-sphinx{8,9}] deps = sphinx8: sphinx>=8,<9 extras =