Opened 4 months ago

Closed 4 months ago

Last modified 4 months ago

#35661 closed Bug (fixed)

`test_too_many_digits_to_render` test fails with PyPy3.10 7.3.16

Reported by: Michał Górny Owned by: Mariusz Felisiak
Component: Template system Version: 5.0
Severity: Normal Keywords:
Cc: Michał Górny, Sarah Boyce Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When running the test suite in 5.0.8 (also reproduced via tox -e pypy3 on a05187fce613a70a5e5c93c978d36497a10fcf1f):

======================================================================
ERROR: test_too_many_digits_to_render (template_tests.filter_tests.test_floatformat.FunctionTests) [<object object at 0x000055ed663acdd8>] (value='10000000000000000000000000000[...]0000000')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/pypy3.10/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib/pypy3.10/unittest/case.py", line 498, in subTest
    yield
  File "/tmp/portage/dev-python/django-5.0.8/work/Django-5.0.8/tests/template_tests/filter_tests/test_floatformat.py", line 153, in tes
t_too_many_digits_to_render
    self.assertEqual(floatformat(value), value)
  File "/tmp/portage/dev-python/django-5.0.8/work/Django-5.0.8/django/template/defaultfilters.py", line 156, in floatformat
    d = Decimal(input_val)
  File "/usr/lib/pypy3.10/_pydecimal.py", line 566, in __new__
    self._int = str(int(intpart+fracpart))
ValueError: Exceeds the limit (4300) for integer string conversion: value has 1000001 digits

----------------------------------------------------------------------
Ran 16827 tests in 541.813s

FAILED (errors=1, skipped=1300, expected failures=5)

Change History (5)

comment:1 by Natalia Bidart, 4 months ago

Cc: Sarah Boyce added
Component: UncategorizedTemplate system
Triage Stage: UnreviewedAccepted

Hello Michał Górny, thank you for this report.

Confirmed this is failing for PyPy in our scheduled tests actions (PyPy+SQLite and PyPy+Postgresql).

Issue introduced in c19465ad87e33b6122c886b97a202ad54cd43672.

comment:2 by Mariusz Felisiak, 4 months ago

Has patch: set
Owner: set to Mariusz Felisiak
Status: newassigned

comment:3 by Sarah Boyce, 4 months ago

Triage Stage: AcceptedReady for checkin

comment:4 by Sarah Boyce <42296566+sarahboyce@…>, 4 months ago

Resolution: fixed
Status: assignedclosed

In 7fb15ad5:

Fixed #35661 -- Fixed test_too_many_digits_to_rander() test crash on PyPy.

Thanks Michał Górny for the report.

comment:5 by Sarah Boyce <42296566+sarahboyce@…>, 4 months ago

In d9aeb23e:

[5.1.x] Fixed #35661 -- Fixed test_too_many_digits_to_rander() test crash on PyPy.

Thanks Michał Górny for the report.

Backport of 7fb15ad5bcae05324ee8913e4b2c6c982e8f2de0 from main.

Note: See TracTickets for help on using tickets.
Back to Top