Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️ Drop sphinx 4 support, add sphinx 6 #664

Merged
merged 1 commit into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand All @@ -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
Expand Down Expand Up @@ -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 "\
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>=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"',
]

Expand Down
9 changes: 4 additions & 5 deletions tests/test_sphinx/test_sphinx_builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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"] == {
Expand Down Expand Up @@ -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",
)


Expand Down Expand Up @@ -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",
)


Expand Down Expand Up @@ -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",
)


Expand Down
252 changes: 0 additions & 252 deletions tests/test_sphinx/test_sphinx_builds/test_basic.sphinx4.html

This file was deleted.

Loading