Skip to content

Commit 4b693b8

Browse files
committed
Changed toml dependency to tomli.
1 parent fb31b2a commit 4b693b8

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

doc/source/conf.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
from pathlib import Path
2424
from runpy import run_path
2525

26-
import toml
26+
try:
27+
import tomllib
28+
except ImportError:
29+
import tomli as tomllib
2730

2831
# Check for external Sphinx extensions we depend on
2932
try:
@@ -52,7 +55,8 @@
5255
fobj.write(rel['long_description'])
5356

5457
# Load metadata from setup.cfg
55-
pyproject_dict = toml.load(Path("../../pyproject.toml"))
58+
with open(Path("../../pyproject.toml"), 'rb') as f:
59+
pyproject_dict = tomllib.load(f)
5660
metadata = pyproject_dict["project"]
5761

5862
# Add any Sphinx extension module names here, as strings. They can be

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ doc =
1212
numpydoc
1313
sphinx ~= 5.3
1414
texext
15-
toml
15+
tomli; python_version < "3.11"
1616
minc2 =
1717
h5py
1818
spm =

0 commit comments

Comments
 (0)