Skip to content

Commit 835eddb

Browse files
committed
fix deprecations introduced by sphinx v8
1 parent 6834615 commit 835eddb

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

conftest.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
import os.path as osp
2-
import sys
32
import pytest
3+
import sphinx
4+
import sys
5+
from packaging.version import Version
46

5-
from sphinx.testing.path import path
7+
if Version(sphinx.__version__) < Version("8.0.0"):
8+
from sphinx.testing.path import path
9+
else:
10+
from pathlib import Path as path
611

712
pytest_plugins = 'sphinx.testing.fixtures'
813

914

10-
1115
sphinx_supp = osp.abspath(osp.join(osp.dirname(__file__), "tests"))
1216

1317

0 commit comments

Comments
 (0)