diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 37b5072b..7b7b64e7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,15 +26,15 @@ jobs: fail-fast: false matrix: python-version: ["3.8", "3.9", "3.10", "3.11"] - sphinx: [">=6,<7"] + sphinx: [">=7,<8"] os: [ubuntu-latest] include: - os: ubuntu-latest python-version: "3.8" - sphinx: ">=5,<6" + sphinx: ">=6,<7" - os: windows-latest python-version: "3.8" - sphinx: ">=5,<6" + sphinx: ">=6,<7" runs-on: ${{ matrix.os }} diff --git a/pyproject.toml b/pyproject.toml index 2bc231c4..6c779419 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "markdown-it-py~=3.0", "mdit-py-plugins~=0.4", "pyyaml", - "sphinx>=5,<7", + "sphinx>=6,<8", ] [project.urls] diff --git a/tests/test_docutils.py b/tests/test_docutils.py index fc509dcc..6e6a22dc 100644 --- a/tests/test_docutils.py +++ b/tests/test_docutils.py @@ -3,9 +3,6 @@ from textwrap import dedent from typing import Literal -import pytest -from docutils import VersionInfo, __version_info__ - from myst_parser.mdit_to_docutils.base import make_document from myst_parser.parsers.docutils_ import ( Parser, @@ -101,10 +98,6 @@ def test_help_text(): assert "MyST options" in stream.getvalue() -@pytest.mark.skipif( - __version_info__ < VersionInfo(0, 17, 0, "final", 0, True), - reason="parser option added in docutils 0.17", -) def test_include_from_rst(tmp_path): """Test including a MyST file from within an RST file.""" from docutils.parsers.rst import Parser as RSTParser diff --git a/tests/test_sphinx/test_sphinx_builds.py b/tests/test_sphinx/test_sphinx_builds.py index a41e96b8..db376e18 100644 --- a/tests/test_sphinx/test_sphinx_builds.py +++ b/tests/test_sphinx/test_sphinx_builds.py @@ -278,10 +278,6 @@ def test_includes( ) -@pytest.mark.skipif( - __version_info__ < VersionInfo(0, 17, 0, "final", 0, True), - reason="parser option added in docutils 0.17", -) @pytest.mark.sphinx( buildername="html", srcdir=os.path.join(SOURCE_DIR, "include_from_rst"), @@ -337,6 +333,9 @@ def test_footnotes( filename="footnote_md.html", regress_html=True, regress_ext=".html", + replace={ + 'role="note">': 'role="doc-footnote">', # changed in docutils 0.20 + }, ) diff --git a/tests/test_sphinx/test_sphinx_builds/test_footnotes.html b/tests/test_sphinx/test_sphinx_builds/test_footnotes.html index 546739c3..8f88fcbf 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_footnotes.html +++ b/tests/test_sphinx/test_sphinx_builds/test_footnotes.html @@ -98,7 +98,7 @@