diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 208652db..6ca1ae05 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -25,16 +25,16 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: ["3.7", "3.8", "3.9", "3.10"]
- sphinx: [">=5,<6"]
+ python-version: ["3.8", "3.9", "3.10", "3.11"]
+ sphinx: [">=6,<7"]
os: [ubuntu-latest]
include:
- os: ubuntu-latest
python-version: "3.8"
- sphinx: ">=4,<5"
+ sphinx: ">=5,<6"
- os: windows-latest
python-version: "3.8"
- sphinx: ">=4,<5"
+ sphinx: ">=5,<6"
runs-on: ${{ matrix.os }}
@@ -47,8 +47,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- pip install -e .[linkify,testing]
- pip install --upgrade-strategy "only-if-needed" "sphinx${{ matrix.sphinx }}"
+ pip install -e ".[linkify,testing]" "sphinx${{ matrix.sphinx }}"
- name: Run pytest
run: |
pytest --cov=myst_parser --cov-report=xml --cov-report=term-missing
@@ -87,8 +86,7 @@ jobs:
run: python .github/workflows/docutils_setup.py pyproject.toml README.md
- name: Install dependencies
run: |
- pip install .
- pip install pytest~=6.2 pytest-param-files~=0.3.3 pygments docutils==${{ matrix.docutils-version }}
+ pip install . pytest~=6.2 pytest-param-files~=0.3.3 pygments docutils==${{ matrix.docutils-version }}
- name: ensure sphinx is not installed
run: |
python -c "\
diff --git a/pyproject.toml b/pyproject.toml
index 1e71cf66..b3b3a90e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -39,7 +39,7 @@ dependencies = [
"markdown-it-py>=1.0.0,<3.0.0",
"mdit-py-plugins~=0.3.3",
"pyyaml",
- "sphinx>=4,<6",
+ "sphinx>=5,<7",
'typing-extensions; python_version < "3.8"',
]
diff --git a/tests/test_sphinx/test_sphinx_builds.py b/tests/test_sphinx/test_sphinx_builds.py
index 0d45a424..8ede05d7 100644
--- a/tests/test_sphinx/test_sphinx_builds.py
+++ b/tests/test_sphinx/test_sphinx_builds.py
@@ -11,7 +11,6 @@
import re
import pytest
-import sphinx
from docutils import VersionInfo, __version_info__
SOURCE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "sourcedirs"))
@@ -54,7 +53,7 @@ def test_basic(
app,
filename="content.html",
regress_html=True,
- regress_ext=f".sphinx{sphinx.version_info[0]}.html",
+ regress_ext=".html",
)
assert app.env.metadata["content"] == {
@@ -333,7 +332,7 @@ def test_footnotes(
app,
filename="footnote_md.html",
regress_html=True,
- regress_ext=f".sphinx{sphinx.version_info[0]}.html",
+ regress_ext=".html",
)
@@ -454,7 +453,7 @@ def test_gettext_html(
app,
filename="index.html",
regress_html=True,
- regress_ext=f".sphinx{sphinx.version_info[0]}.html",
+ regress_ext=".html",
)
@@ -555,7 +554,7 @@ def test_fieldlist_extension(
app,
filename="index.html",
regress_html=True,
- regress_ext=f".sphinx{sphinx.version_info[0]}.html",
+ regress_ext=".html",
)
diff --git a/tests/test_sphinx/test_sphinx_builds/test_basic.sphinx5.html b/tests/test_sphinx/test_sphinx_builds/test_basic.html
similarity index 100%
rename from tests/test_sphinx/test_sphinx_builds/test_basic.sphinx5.html
rename to tests/test_sphinx/test_sphinx_builds/test_basic.html
diff --git a/tests/test_sphinx/test_sphinx_builds/test_basic.sphinx4.html b/tests/test_sphinx/test_sphinx_builds/test_basic.sphinx4.html
deleted file mode 100644
index 743f7a19..00000000
--- a/tests/test_sphinx/test_sphinx_builds/test_basic.sphinx4.html
+++ /dev/null
@@ -1,252 +0,0 @@
-
-
-
-
-
- Dedication
-
-
- To my
-
- homies
-
-
-
-
-
- Abstract
-
-
- Something something
-
- dark
-
- side
-
-
-
-
-
-
diff --git a/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx5.html b/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.html
similarity index 100%
rename from tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx5.html
rename to tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.html
diff --git a/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx4.html b/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx4.html
deleted file mode 100644
index bef86e92..00000000
--- a/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx4.html
+++ /dev/null
@@ -1,131 +0,0 @@
-
-
-
-
-
- Test
-
-
-
- -
- field
-
- -
-
-
-
- -
-
- field
-
-
- -
-
- content
-
-
-
-
- -
-
-
- send_message
-
-
-
- (
-
-
-
-
- sender
-
-
-
- ,
-
-
-
- priority
-
-
-
-
- )
-
-
-
- -
-
- Send a message to a recipient
-
-
- -
- Parameters
-
- -
-
- -
-
-
- sender
-
- (
-
- str
-
- ) – The person sending the message
-
-
- -
-
-
- priority
-
- (
-
- int
-
- ) – The priority of the message, can be a number 1-5
-
-
-
-
- -
- Returns
-
- -
-
- the message id
-
-
- -
- Return type
-
- -
-
- int
-
-
- -
- Raises
-
- -
-
-
- ValueError
-
- – if the message_body exceeds 160 characters
-
-
-
-
-
-
-
-
-
diff --git a/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx5.html b/tests/test_sphinx/test_sphinx_builds/test_footnotes.html
similarity index 100%
rename from tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx5.html
rename to tests/test_sphinx/test_sphinx_builds/test_footnotes.html
diff --git a/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx4.html b/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx4.html
deleted file mode 100644
index 70cfb540..00000000
--- a/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx4.html
+++ /dev/null
@@ -1,147 +0,0 @@
-
diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx5.html b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.html
similarity index 100%
rename from tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx5.html
rename to tests/test_sphinx/test_sphinx_builds/test_gettext_html.html
diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx4.html b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx4.html
deleted file mode 100644
index 825048a1..00000000
--- a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx4.html
+++ /dev/null
@@ -1,162 +0,0 @@
-
-
-
-
-
- texte 1 en
-
- gras
-
-
-
-
- texte 2 en
-
- gras
-
-
-
-
-
- texte 3 en
-
- gras
-
-
-
-
-
-
- Note
-
-
- texte 4 en
-
- gras
-
-
-
-
-
- -
-
- texte 6 en
-
- gras
-
-
-
-
-
- -
- texte 7 en
-
- gras
-
-
- -
-
- texte 8 en
-
- gras
-
-
-
-
-
-
-
-
-
- texte 9 en
-
- gras
-
-
- |
-
-
-
-
-
-
- texte 10 en
-
- gras
-
-
- |
-
-
-
-
-
- texte 11 en
-
- gras
-
-
-
- «
-
-
- Backtick
-
-
- » supplémentaire
-
-
-
-
-
**additional** text 12
-
-
-
-
-
-
**additional** text 13
-
-
-
-
-
-
{
- "additional": "text 14"
-}
-
-
-
-
- **additional** text 15
-
-
-
-
>>> print('doctest block')
-doctest block
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tox.ini b/tox.ini
index 4a0110e6..17a3e1c7 100644
--- a/tox.ini
+++ b/tox.ini
@@ -11,20 +11,18 @@
# then then deleting compiled files has been found to fix it: `find . -name \*.pyc -delete`
[tox]
-envlist = py37-sphinx5
+envlist = py38-sphinx6
[testenv]
usedevelop = true
-[testenv:py{37,38,39,310}-sphinx{4,5}]
+[testenv:py{37,38,39,310,311}-sphinx{5,6}]
deps =
- black
- flake8
+ sphinx5: sphinx>=5,<6
+ sphinx6: sphinx>=6,<7
extras =
linkify
testing
-commands_pre =
- sphinx4: pip install --quiet --upgrade-strategy "only-if-needed" "sphinx==4.5.0"
commands = pytest {posargs}
[testenv:docs-{update,clean}]