Package: src:wtforms
Version: 3.2.1-1
User: [email protected]
Usertags: python3.15
Tags: patch, ftbfs, forky, sid
Hi!
While rebuilding the python related packages against the Python 3.15rc1
version we found that wtforms fails to build from source [1].
The build fails with errors like this one:
AssertionError: Expected value 1’23’456.789 to parse as a decimal,
instead got ['Keine gültige Dezimalzahl']
This is due to changes in Babel 2.18 (CLDR 47), which changed
babel.numbers.get_group_symbol("de_CH") from \` to \'
I've added a patch to support this. The patch should be forwarded
upstream
I applied the fix in the sandbox [2] to be able to build the packages
that depend on wtforms, please consider applying the patch to support
the upcoming 3.15 version.
Happy hacking,
[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4519941/
[2]: https://debusine.debian.net/debian/r-python-python3.15/
--
"Can you imagine what I would do if I could do all I can?" -- Sun Tzu
Saludos /\/\ /\ >< `/
From: Maximiliano Curia <[email protected]>
Date: Wed, 2 Sep 2026 17:20:00 +0200
Subject: tests: Use Babel group symbol for de_CH
In Babel 2.18 (with CLDR 47), the thousands grouping separator for de_CH
changed from '’' to '\''. Use babel.numbers.get_group_symbol to retrieve it
dynamically.
Forwarded: no
---
tests/test_locale_babel.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/test_locale_babel.py b/tests/test_locale_babel.py
index a8e7523..a9e84ff 100644
--- a/tests/test_locale_babel.py
+++ b/tests/test_locale_babel.py
@@ -1,6 +1,7 @@
from decimal import Decimal
from decimal import ROUND_UP
+import babel.numbers
import pytest
from tests.common import DummyPostData
@@ -52,7 +53,8 @@ def test_formatting():
_format_test("123.456,789", val, ["es_ES"])
_format_test("123.456,789", val, ["de_DE"])
_format_test("-5,2", neg, ["de_DE"])
- _format_test("-12’345.2", "-12345.2", ["de_CH"])
+ group_symbol = babel.numbers.get_group_symbol("de_CH")
+ _format_test(f"-12{group_symbol}345.2", "-12345.2", ["de_CH"])
def _parse_test(raw_val, expected, locales=unset_value):
@@ -80,7 +82,8 @@ def test_parsing():
_parse_test("1,23,456.789", expected)
_parse_test("1,23,456.789", expected, ["en_US"])
_parse_test("1.23.456,789", expected, ["de_DE"])
- _parse_test("1’23’456.789", expected, ["de_CH"])
+ group_symbol = babel.numbers.get_group_symbol("de_CH")
+ _parse_test(f"1{group_symbol}23{group_symbol}456.789", expected, ["de_CH"])
_fail_parse("1,23,456.5", "Keine g\xfcltige Dezimalzahl.", ["de_DE"])
_fail_parse("1.234.567,5", "Not a valid decimal value.", ["en_US"])