Skip to content

Commit b043351

Browse files
⬆️ UPGRADE: sphinx 7, drop sphinx 5 (#776)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 19b00d2 commit b043351

File tree

6 files changed

+16
-24
lines changed

6 files changed

+16
-24
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ jobs:
2626
fail-fast: false
2727
matrix:
2828
python-version: ["3.8", "3.9", "3.10", "3.11"]
29-
sphinx: [">=6,<7"]
29+
sphinx: [">=7,<8"]
3030
os: [ubuntu-latest]
3131
include:
3232
- os: ubuntu-latest
3333
python-version: "3.8"
34-
sphinx: ">=5,<6"
34+
sphinx: ">=6,<7"
3535
- os: windows-latest
3636
python-version: "3.8"
37-
sphinx: ">=5,<6"
37+
sphinx: ">=6,<7"
3838

3939
runs-on: ${{ matrix.os }}
4040

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ dependencies = [
3939
"markdown-it-py~=3.0",
4040
"mdit-py-plugins~=0.4",
4141
"pyyaml",
42-
"sphinx>=5,<7",
42+
"sphinx>=6,<8",
4343
]
4444

4545
[project.urls]

tests/test_docutils.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
from textwrap import dedent
44
from typing import Literal
55

6-
import pytest
7-
from docutils import VersionInfo, __version_info__
8-
96
from myst_parser.mdit_to_docutils.base import make_document
107
from myst_parser.parsers.docutils_ import (
118
Parser,
@@ -101,10 +98,6 @@ def test_help_text():
10198
assert "MyST options" in stream.getvalue()
10299

103100

104-
@pytest.mark.skipif(
105-
__version_info__ < VersionInfo(0, 17, 0, "final", 0, True),
106-
reason="parser option added in docutils 0.17",
107-
)
108101
def test_include_from_rst(tmp_path):
109102
"""Test including a MyST file from within an RST file."""
110103
from docutils.parsers.rst import Parser as RSTParser

tests/test_sphinx/test_sphinx_builds.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,6 @@ def test_includes(
278278
)
279279

280280

281-
@pytest.mark.skipif(
282-
__version_info__ < VersionInfo(0, 17, 0, "final", 0, True),
283-
reason="parser option added in docutils 0.17",
284-
)
285281
@pytest.mark.sphinx(
286282
buildername="html",
287283
srcdir=os.path.join(SOURCE_DIR, "include_from_rst"),
@@ -337,6 +333,9 @@ def test_footnotes(
337333
filename="footnote_md.html",
338334
regress_html=True,
339335
regress_ext=".html",
336+
replace={
337+
'role="note">': 'role="doc-footnote">', # changed in docutils 0.20
338+
},
340339
)
341340

342341

tests/test_sphinx/test_sphinx_builds/test_footnotes.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ <h1>
9898
</blockquote>
9999
<hr class="footnotes docutils"/>
100100
<aside class="footnote-list brackets">
101-
<aside class="footnote brackets" id="c" role="note">
101+
<aside class="footnote brackets" id="c" role="doc-footnote">
102102
<span class="label">
103103
<span class="fn-bracket">
104104
[
@@ -114,7 +114,7 @@ <h1>
114114
a footnote referenced first
115115
</p>
116116
</aside>
117-
<aside class="footnote brackets" id="d" role="note">
117+
<aside class="footnote brackets" id="d" role="doc-footnote">
118118
<span class="label">
119119
<span class="fn-bracket">
120120
[
@@ -130,7 +130,7 @@ <h1>
130130
a footnote referenced in a directive
131131
</p>
132132
</aside>
133-
<aside class="footnote brackets" id="a" role="note">
133+
<aside class="footnote brackets" id="a" role="doc-footnote">
134134
<span class="label">
135135
<span class="fn-bracket">
136136
[
@@ -149,7 +149,7 @@ <h1>
149149
</em>
150150
</p>
151151
</aside>
152-
<aside class="footnote brackets" id="b" role="note">
152+
<aside class="footnote brackets" id="b" role="doc-footnote">
153153
<span class="label">
154154
<span class="fn-bracket">
155155
[
@@ -165,7 +165,7 @@ <h1>
165165
a footnote before its reference
166166
</p>
167167
</aside>
168-
<aside class="footnote brackets" id="id8" role="note">
168+
<aside class="footnote brackets" id="id8" role="doc-footnote">
169169
<span class="label">
170170
<span class="fn-bracket">
171171
[
@@ -190,7 +190,7 @@ <h1>
190190
multiple references footnote
191191
</p>
192192
</aside>
193-
<aside class="footnote brackets" id="e" role="note">
193+
<aside class="footnote brackets" id="e" role="doc-footnote">
194194
<span class="label">
195195
<span class="fn-bracket">
196196
[

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
# then then deleting compiled files has been found to fix it: `find . -name \*.pyc -delete`
1212

1313
[tox]
14-
envlist = py38-sphinx6
14+
envlist = py38-sphinx7
1515

1616
[testenv]
1717
usedevelop = true
1818

19-
[testenv:py{37,38,39,310,311}-sphinx{5,6}]
19+
[testenv:py{37,38,39,310,311}-sphinx{6,7}]
2020
deps =
21-
sphinx5: sphinx>=5,<6
2221
sphinx6: sphinx>=6,<7
22+
sphinx7: sphinx>=7,<8
2323
extras =
2424
linkify
2525
testing

0 commit comments

Comments
 (0)