Skip to content

Commit

Permalink
⬆️ Drop sphinx 4 support, add sphinx 6 (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Jan 5, 2023
1 parent bf56662 commit 2a206a8
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 712 deletions.
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.

1 comment on commit 2a206a8

@cooperlees
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything we can do to help get a release with this to PyPI?

Please sign in to comment.