1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
From dee37e86382ac3ca84d87914166d3dfbce9079ba Mon Sep 17 00:00:00 2001
From: Alexandre Detiste <alexandre.detiste@gmail.com>
Date: Sat, 17 May 2025 15:14:12 +0200
Subject: [PATCH] prefer tomllib from the standard library
---
docs/conf.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/docs/conf.py b/docs/conf.py
index a83a030..a253d7b 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -13,7 +13,10 @@
import os
import sys
-import tomli
+try:
+ import tomllib
+except ImportError:
+ import tomli as tomllib
sys.path.insert(0, os.path.abspath('..'))
@@ -22,7 +25,7 @@
def _get_project_meta():
with open('../pyproject.toml', mode='rb') as pyproject:
- return tomli.load(pyproject)['tool']['poetry']
+ return tomllib.load(pyproject)['tool']['poetry']
pkg_meta = _get_project_meta()
|