[2.0.x] Fixed #30177 -- Fixed format_number() crash with over 200 digits.

There are existing test failures. The incorrect patch was applied
in 1f42f82566.
This commit is contained in:
Tim Graham 2019-02-11 13:40:04 -05:00
parent 6d0a3002ed
commit 392e040647
3 changed files with 15 additions and 1 deletions

View File

@ -36,7 +36,7 @@ def format(number, decimal_sep, decimal_pos=None, grouping=0, thousand_sep='',
# Format the coefficient.
coefficient = format(
coefficient, decimal_sep, decimal_pos, grouping,
thousand_sep, force_grouping, use_l10n,
thousand_sep, force_grouping,
)
return '{}e{}'.format(coefficient, exponent)
else:

13
docs/releases/2.0.13.txt Normal file
View File

@ -0,0 +1,13 @@
===========================
Django 2.0.13 release notes
===========================
*February 12, 2019*
Django 2.0.13 fixes a regression in 2.0.12/2.0.11.
Bugfixes
========
* Fixed crash in ``django.utils.numberformat.format_number()`` when the number
has over 200 digits (:ticket:`30177`).

View File

@ -25,6 +25,7 @@ versions of the documentation contain the release notes for any later releases.
.. toctree::
:maxdepth: 1
2.0.13
2.0.12
2.0.11
2.0.10