Package: src:wtforms
Version: 3.0.1-2
Severity: important
Tags: sid trixie
User: debian-pyt...@lists.debian.org
Usertags: python3.12

wtforms autopkg tests fail with Python 3.12:

[...]
194s =================================== FAILURES =================================== 194s ______________________ TestLocaleDecimal.test_formatting _______________________
194s
194s self = <tests.test_locale_babel.TestLocaleDecimal object at 0x7f4126836d50>
194s
194s     def test_formatting(self):
194s         val = Decimal("123456.789")
194s         neg = Decimal("-5.2")
194s >       self._format_test("1,23,456.789", val)
194s
194s tests/test_locale_babel.py:46:
194s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
194s tests/test_locale_babel.py:24: in _format_test
194s     assert form.a._value() == expected
194s /usr/lib/python3/dist-packages/wtforms/fields/numeric.py:138: in _value
194s     return str(self._format_decimal(self.data))
194s /usr/lib/python3/dist-packages/wtforms/fields/numeric.py:52: in _format_decimal 194s return self.babel_numbers.format_decimal(value, self.number_format, self.locale)
194s /usr/lib/python3/dist-packages/babel/numbers.py:422: in format_decimal
194s     format = locale.decimal_formats.get(format)
194s /usr/lib/python3/dist-packages/babel/core.py:565: in decimal_formats
194s     return self._data['decimal_formats']
194s /usr/lib/python3/dist-packages/babel/core.py:363: in _data
194s     self.__data = localedata.LocaleDataDict(localedata.load(str(self)))
194s /usr/lib/python3/dist-packages/babel/localedata.py:140: in load
194s     data = load(parent).copy()
194s /usr/lib/python3/dist-packages/babel/localedata.py:140: in load
194s     data = load(parent).copy()
194s /usr/lib/python3/dist-packages/babel/localedata.py:146: in load
194s     data = pickle.load(fileobj)
194s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
194s
194s     """
194s         babel.dates
194s         ~~~~~~~~~~~
194s
194s         Locale dependent formatting and parsing of dates and times.
194s
194s The default locale for the functions in this module is determined by the
194s         following environment variables, in that order:
194s
194s          * ``LC_TIME``,
194s          * ``LC_ALL``, and
194s          * ``LANG``
194s
194s         :copyright: (c) 2013-2022 by the Babel Team.
194s         :license: BSD, see LICENSE for more details.
194s     """
194s
194s
194s     import re
194s     import warnings
194s >   import pytz as _pytz
194s E     File "/usr/lib/python3/dist-packages/pytz/__init__.py", line 30
194s E       match = re.match("^#\s*version\s*([0-9a-z]*)\s*$", line)
194s E                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
194s E   SyntaxError: invalid escape sequence '\s'
194s
194s /usr/lib/python3/dist-packages/babel/dates.py:21: SyntaxError
194s ________________________ TestLocaleDecimal.test_parsing ________________________
194s
194s self = <tests.test_locale_babel.TestLocaleDecimal object at 0x7f4126836db0>
194s
194s     def test_parsing(self):
194s         expected = Decimal("123456.789")
194s >       self._parse_test("1,23,456.789", expected)
194s
194s tests/test_locale_babel.py:77:
194s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
194s tests/test_locale_babel.py:59: in _parse_test
194s     form = self.F(DummyPostData(a=raw_val), meta=meta)
194s /usr/lib/python3/dist-packages/wtforms/form.py:208: in __call__
194s     return type.__call__(cls, *args, **kwargs)
194s /usr/lib/python3/dist-packages/wtforms/form.py:286: in __init__
194s     self.process(formdata, obj, data=data, **kwargs)
194s /usr/lib/python3/dist-packages/wtforms/form.py:127: in process
194s     field.process(formdata, data, extra_filters=field_extra_filters)
194s /usr/lib/python3/dist-packages/wtforms/fields/core.py:328: in process
194s     self.process_formdata(self.raw_data)
194s /usr/lib/python3/dist-packages/wtforms/fields/numeric.py:162: in process_formdata
194s     self.data = self._parse_decimal(valuelist[0])
194s /usr/lib/python3/dist-packages/wtforms/fields/numeric.py:49: in _parse_decimal
194s     return self.babel_numbers.parse_decimal(value, self.locale)
194s /usr/lib/python3/dist-packages/babel/numbers.py:732: in parse_decimal
194s     group_symbol = get_group_symbol(locale)
194s /usr/lib/python3/dist-packages/babel/numbers.py:335: in get_group_symbol
194s     return Locale.parse(locale).number_symbols.get('group', u',')
194s /usr/lib/python3/dist-packages/babel/core.py:553: in number_symbols
194s     return self._data['number_symbols']
194s /usr/lib/python3/dist-packages/babel/core.py:363: in _data
194s     self.__data = localedata.LocaleDataDict(localedata.load(str(self)))
194s /usr/lib/python3/dist-packages/babel/localedata.py:140: in load
194s     data = load(parent).copy()
194s /usr/lib/python3/dist-packages/babel/localedata.py:140: in load
194s     data = load(parent).copy()
194s /usr/lib/python3/dist-packages/babel/localedata.py:146: in load
194s     data = pickle.load(fileobj)
194s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
194s
194s     """
194s         babel.dates
194s         ~~~~~~~~~~~
194s
194s         Locale dependent formatting and parsing of dates and times.
194s
194s The default locale for the functions in this module is determined by the
194s         following environment variables, in that order:
194s
194s          * ``LC_TIME``,
194s          * ``LC_ALL``, and
194s          * ``LANG``
194s
194s         :copyright: (c) 2013-2022 by the Babel Team.
194s         :license: BSD, see LICENSE for more details.
194s     """
194s
194s
194s     import re
194s     import warnings
194s >   import pytz as _pytz
194s E     File "/usr/lib/python3/dist-packages/pytz/__init__.py", line 30
194s E       match = re.match("^#\s*version\s*([0-9a-z]*)\s*$", line)
194s E                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
194s E   SyntaxError: invalid escape sequence '\s'
194s
194s /usr/lib/python3/dist-packages/babel/dates.py:21: SyntaxError
194s =========================== short test summary info ============================ 194s FAILED tests/test_locale_babel.py::TestLocaleDecimal::test_formatting - Fil... 194s FAILED tests/test_locale_babel.py::TestLocaleDecimal::test_parsing - File "... 194s ======================== 2 failed, 336 passed in 0.88s =========================

Reply via email to