Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
import sys
from pathlib import Path

try:
# Added in Python 3.11
import tomllib
except ImportError
import tomli as tomllib

# Ensure documentation examples are determinstically random.
import numpy
import tomli
from pkg_resources import get_distribution

try:
Expand All @@ -21,7 +26,7 @@

# Get configuration information from `pyproject.toml`
with open(Path(__file__).parent.parent / "pyproject.toml", "rb") as configuration_file:
conf = tomli.load(configuration_file)
conf = tomllib.load(configuration_file)
configuration = conf["project"]

# -- General configuration ----------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dynamic = ['version']

[project.optional-dependencies]
docs = [
'tomli',
'tomli; python_version < "3.11"',
'sphinx',
'sphinx-asdf >= 0.1.3',
'sphinx-astropy',
Expand Down