Skip to content

Commit 4a533ce

Browse files
committed
Dependencies: Add compatibility with sphinx 7.2
1 parent d0156d0 commit 4a533ce

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44
- Dependencies: Added compatibility with docutils 0.21
5+
- Dependencies: Added compatibility with sphinx 7.2
56

67
## v0.4.0 - 2024-06-27
78
- Dependencies: Update to sphinx-design 0.6.0

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ dependencies = [
8484
"beautifulsoup4",
8585
"docutils<0.22",
8686
"myst-parser",
87-
"sphinx<7.2",
87+
"sphinx<7.3",
8888
"sphinx-design==0.6.1",
8989
"standard-imghdr; python_version>='3.13'",
9090
]

sphinx_design_elements/hyper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import re
2-
from typing import Any, Dict, List, Tuple, Union
2+
from typing import Any, Dict, List, Sequence, Tuple, Union
33
from unittest.mock import patch
44
from urllib.parse import parse_qs
55

@@ -82,7 +82,7 @@ def __call__(
8282
lineno: int,
8383
inliner: Union[Inliner, MockInliner],
8484
options: Union[Dict, None] = None,
85-
content: Union[List[str], None] = None,
85+
content: Union[Sequence[str], None] = None,
8686
) -> Tuple[List[Node], List[system_message]]:
8787

8888
self.with_container = False

tests/conftest.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@
33
from typing import Any, Callable, Dict, Optional
44

55
import pytest
6+
import sphinx
67
from docutils import nodes
78
from docutils.parsers.rst import roles
89
from sphinx import addnodes
9-
from sphinx.testing.path import path as sphinx_path
1010
from sphinx.testing.util import SphinxTestApp
1111
from sphinx_design._compat import findall
12+
from verlib2 import Version
13+
14+
if Version(sphinx.__version__) < Version("7.2"):
15+
from sphinx.testing.path import path as sphinx_path
16+
else:
17+
from pathlib import Path as sphinx_path
1218

1319
pytest_plugins = "sphinx.testing.fixtures"
1420

0 commit comments

Comments
 (0)