From b043351c6831a6a4eacbd742b7f795a1c4b71710 Mon Sep 17 00:00:00 2001
From: Chris Sewell
Date: Tue, 6 Jun 2023 02:20:12 +0200
Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20UPGRADE:=20sphinx=207,=20d?=
=?UTF-8?q?rop=20sphinx=205=20(#776)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
---
.github/workflows/tests.yml | 6 +++---
pyproject.toml | 2 +-
tests/test_docutils.py | 7 -------
tests/test_sphinx/test_sphinx_builds.py | 7 +++----
.../test_sphinx_builds/test_footnotes.html | 12 ++++++------
tox.ini | 6 +++---
6 files changed, 16 insertions(+), 24 deletions(-)
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 @@
-