File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 2525import inspect
2626import os
2727import sys
28- import toml
28+
29+ try :
30+ import tomllib
31+ except ImportError :
32+ import tomli as tomllib
2933
3034this_dir = os .path .dirname (os .path .abspath (__file__ ))
3135repo_root = os .path .abspath (os .path .join (this_dir , ".." ))
4549templates_path = []
4650source_suffix = ".rst"
4751
48- with open (os .path .join (repo_root , "pyproject.toml" ), "r " ) as f :
49- pyproject = toml .load (f )
52+ with open (os .path .join (repo_root , "pyproject.toml" ), "rb " ) as f :
53+ pyproject = tomllib .load (f )
5054
5155# The master toctree document.
5256master_doc = "index"
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ dev = [
3636 " ruff>=0.9.1" ,
3737 " sphinx>=7.4.7" ,
3838 " sphinx-rtd-theme>=3.0.2" ,
39- " toml>=0.10.2 " ,
39+ " tomli;python_version<'3.11' " ,
4040 " types-pyyaml>=6.0.12.20241230" ,
4141]
4242
You can’t perform that action at this time.
0 commit comments