File: tomli.patch

package info (click to toggle)
python-pykka 4.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 520 kB
  • sloc: python: 2,817; makefile: 113
file content (27 lines) | stat: -rw-r--r-- 652 bytes parent folder | download
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
Forwarded: https://github.com/jodal/pykka/pull/237

--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,8 +1,12 @@
 """Pykka documentation build configuration file."""
 
 import pathlib
+import sys
 
-import tomli
+if sys.version_info >= (3, 11):
+    import tomllib
+else:
+    import tomli as tomllib
 
 project = "Pykka"
 author = "Stein Magnus Jodal and contributors"
@@ -10,7 +14,7 @@
 
 pyproject_path = pathlib.Path(__file__).parent.parent / "pyproject.toml"
 with pyproject_path.open("rb") as fh:
-    pyproject = tomli.load(fh)
+    pyproject = tomllib.load(fh)
 release = pyproject["project"]["version"]
 version = ".".join(release.split(".")[:2])