Skip to content

Commit

Permalink
⬆️ UPGRADE: sphinx 7, drop sphinx 5 (#776)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
chrisjsewell and pre-commit-ci[bot] authored Jun 6, 2023
1 parent 19b00d2 commit b043351
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 24 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies = [
"markdown-it-py~=3.0",
"mdit-py-plugins~=0.4",
"pyyaml",
"sphinx>=5,<7",
"sphinx>=6,<8",
]

[project.urls]
Expand Down
7 changes: 0 additions & 7 deletions tests/test_docutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions tests/test_sphinx/test_sphinx_builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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
},
)


Expand Down
12 changes: 6 additions & 6 deletions tests/test_sphinx/test_sphinx_builds/test_footnotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ <h1>
</blockquote>
<hr class="footnotes docutils"/>
<aside class="footnote-list brackets">
<aside class="footnote brackets" id="c" role="note">
<aside class="footnote brackets" id="c" role="doc-footnote">
<span class="label">
<span class="fn-bracket">
[
Expand All @@ -114,7 +114,7 @@ <h1>
a footnote referenced first
</p>
</aside>
<aside class="footnote brackets" id="d" role="note">
<aside class="footnote brackets" id="d" role="doc-footnote">
<span class="label">
<span class="fn-bracket">
[
Expand All @@ -130,7 +130,7 @@ <h1>
a footnote referenced in a directive
</p>
</aside>
<aside class="footnote brackets" id="a" role="note">
<aside class="footnote brackets" id="a" role="doc-footnote">
<span class="label">
<span class="fn-bracket">
[
Expand All @@ -149,7 +149,7 @@ <h1>
</em>
</p>
</aside>
<aside class="footnote brackets" id="b" role="note">
<aside class="footnote brackets" id="b" role="doc-footnote">
<span class="label">
<span class="fn-bracket">
[
Expand All @@ -165,7 +165,7 @@ <h1>
a footnote before its reference
</p>
</aside>
<aside class="footnote brackets" id="id8" role="note">
<aside class="footnote brackets" id="id8" role="doc-footnote">
<span class="label">
<span class="fn-bracket">
[
Expand All @@ -190,7 +190,7 @@ <h1>
multiple references footnote
</p>
</aside>
<aside class="footnote brackets" id="e" role="note">
<aside class="footnote brackets" id="e" role="doc-footnote">
<span class="label">
<span class="fn-bracket">
[
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
# then then deleting compiled files has been found to fix it: `find . -name \*.pyc -delete`

[tox]
envlist = py38-sphinx6
envlist = py38-sphinx7

[testenv]
usedevelop = true

[testenv:py{37,38,39,310,311}-sphinx{5,6}]
[testenv:py{37,38,39,310,311}-sphinx{6,7}]
deps =
sphinx5: sphinx>=5,<6
sphinx6: sphinx>=6,<7
sphinx7: sphinx>=7,<8
extras =
linkify
testing
Expand Down

0 comments on commit b043351

Please sign in to comment.