File: 003.avoid-generating-a-dep-on-tomli.patch

package info (click to toggle)
python-dom-toml 2.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,936 kB
  • sloc: python: 1,360; makefile: 7
file content (44 lines) | stat: -rw-r--r-- 1,071 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From f710c0e8b931cbf00a5bfee55d63d2780127a5ae Mon Sep 17 00:00:00 2001
From: Alexandre Detiste <alexandre.detiste@gmail.com>
Date: Fri, 25 Jul 2025 23:46:41 +0200
Subject: [PATCH] avoid generating a useless dependency on tomli when using
 Py3.11+

---
 pyproject.toml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/pyproject.toml
+++ b/pyproject.toml
@@ -28,7 +28,10 @@
     "Topic :: Software Development :: Libraries :: Python Modules",
     "Typing :: Typed",
 ]
-dependencies = [ "domdf-python-tools>=2.8.0", "tomli>=1.2.3",]
+dependencies = [
+ "domdf-python-tools>=2.8.0",
+ "tomli>=1.2.3; python_version < 3.11",
+]
 dynamic = []
 
 [project.license]
--- a/tests/tests_for_tomliw/test_style.py
+++ b/tests/tests_for_tomliw/test_style.py
@@ -1,5 +1,5 @@
 # 3rd party
-import tomli
+import tomllib as tomli
 
 # this package
 import dom_toml
--- a/tests/tests_for_tomliw/test_valid.py
+++ b/tests/tests_for_tomliw/test_valid.py
@@ -6,7 +6,7 @@
 
 # 3rd party
 import pytest
-import tomli
+import tomllib as tomli
 
 # this package
 import dom_toml