Skip to content

Commit 8747e97

Browse files
committed
MAINT: dropping sphinx<7 and python<3.11 support
1 parent ffac4de commit 8747e97

3 files changed

Lines changed: 11 additions & 17 deletions

File tree

docs/contributing/tests.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ $ tox
1414
You can specify a specific environment like so:
1515

1616
```console
17-
# Run the tests with Python 3.10, Sphinx 6
18-
$ tox -e py310-sphinx6
17+
# Run the tests with Python 3.12, Sphinx 8
18+
$ tox -e py312-sphinx8
1919
```
2020

2121
## List all test environments
@@ -46,7 +46,7 @@ By default, `tox` will only install the necessary environment **once**.
4646
If you'd like to force a re-build, use the `-r` parameter. For example:
4747

4848
```console
49-
$ tox -r -e py310-sphinx6
49+
$ tox -r -e py312-sphinx8
5050
```
5151

5252
## Test audits with lighthouse
@@ -63,7 +63,7 @@ To preview the output of these tests:
6363

6464
## Test multiple Sphinx versions
6565

66-
This theme is tested against Sphinx 6-9.
66+
This theme is tested against Sphinx 7-9.
6767
We try to set up our regression tests such that there are no differences between these Sphinx versions.
6868

6969
### Unit tests

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ description = "A clean book theme for scientific explanations and documentation
3737
dynamic = ["version"]
3838
readme = "README.md"
3939

40-
requires-python = ">=3.9"
40+
requires-python = ">=3.11"
4141
dependencies = [
42-
"sphinx>=6.1",
42+
"sphinx>=7.0",
4343
"pydata-sphinx-theme==0.16.1"
4444
]
4545

tests/test_build.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,8 @@
99
import sphinx
1010
from sphinx.testing.util import SphinxTestApp
1111

12-
sphinx_version = parse(version("sphinx"))
13-
if sphinx_version.major < 7:
14-
from sphinx.testing.path import path as sphinx_path
15-
else:
16-
from pathlib import Path as sphinx_path
17-
1812

13+
sphinx_version = parse(version("sphinx"))
1914
path_tests = Path(__file__).parent
2015

2116

@@ -56,7 +51,7 @@ def html_tree(self, *path):
5651
def sphinx_build_factory(make_app, tmp_path):
5752
def _func(src_folder, **kwargs):
5853
copytree(path_tests / "sites" / src_folder, tmp_path / src_folder)
59-
app = make_app(srcdir=sphinx_path(tmp_path / src_folder), **kwargs)
54+
app = make_app(srcdir=Path(tmp_path / src_folder), **kwargs)
6055
return SphinxBuild(app, tmp_path / src_folder)
6156

6257
yield _func
@@ -469,7 +464,7 @@ def test_sidenote(sphinx_build_factory, file_regression):
469464
page2 = sphinx_build.html_tree("page2.html")
470465

471466
sidenote_html = page2.select("section > #sidenotes")
472-
regression_file = "test_sidenote_6" if sphinx_version.major < 7 else "test_sidenote"
467+
regression_file = "test_sidenote"
473468
file_regression.check(
474469
sidenote_html[0].prettify(),
475470
extension=".html",
@@ -487,9 +482,8 @@ def test_marginnote(sphinx_build_factory, file_regression):
487482
page2 = sphinx_build.html_tree("page2.html")
488483

489484
marginnote_html = page2.select("section > #marginnotes")
490-
regression_file = (
491-
"test_marginnote_6" if sphinx_version.major < 7 else "test_marginnote"
492-
)
485+
regression_file = "test_marginnote"
486+
493487
file_regression.check(
494488
marginnote_html[0].prettify(),
495489
extension=".html",

0 commit comments

Comments
 (0)