Skip to content

Commit 151852f

Browse files
committed
support older python
1 parent 6f2be6f commit 151852f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docs/source/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@
5454
# built documents.
5555
#
5656
# The short X.Y version.
57-
import tomllib
57+
try:
58+
import tomllib
59+
except ImportError:
60+
import tomlli as tomllib
5861
with open("../../pyproject.toml", "rb") as f:
5962
toml_dict = tomllib.load(f)
6063
version = toml_dict['project']['version']

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ wheel
44
Cython
55
Sphinx
66
flake8
7+
tomli; python_version < '3.11'
78
pytest>=8.0.0

0 commit comments

Comments
 (0)