File: python3.14.patch

package info (click to toggle)
dacite 1.9.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 332 kB
  • sloc: python: 1,870; makefile: 8
file content (25 lines) | stat: -rw-r--r-- 1,064 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
From: Stefano Rivera <stefano@rivera.za.net>
Date: Sun, 4 Jan 2026 17:26:46 -0400
Subject: Add support for Python 3.14

Where: str(Union[int, str]) -> 'int | str'

Forwarded: https://github.com/konradhalas/dacite/pull/291
Bug-Debian: https://bugs.debian.org/1123110
---
 tests/core/test_union.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/core/test_union.py b/tests/core/test_union.py
index 3f22c18..bbb1fc2 100644
--- a/tests/core/test_union.py
+++ b/tests/core/test_union.py
@@ -42,7 +42,7 @@ def test_from_dict_with_union_and_wrong_data():
     with pytest.raises(UnionMatchError) as exception_info:
         from_dict(X, {"i": 1.0})
 
-    assert str(exception_info.value) == 'can not match type "float" to any type of "i" union: typing.Union[int, str]'
+    assert str(exception_info.value) == f'can not match type "float" to any type of "i" union: {Union[int, str]}'
     assert exception_info.value.field_path == "i"
     assert exception_info.value.field_type == Union[int, str]
     assert exception_info.value.value == 1.0