Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 392e040

Browse files
committed
[2.0.x] Fixed #30177 -- Fixed format_number() crash with over 200 digits.
There are existing test failures. The incorrect patch was applied in 1f42f82.
1 parent 6d0a300 commit 392e040

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

django/utils/numberformat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def format(number, decimal_sep, decimal_pos=None, grouping=0, thousand_sep='',
3636
# Format the coefficient.
3737
coefficient = format(
3838
coefficient, decimal_sep, decimal_pos, grouping,
39-
thousand_sep, force_grouping, use_l10n,
39+
thousand_sep, force_grouping,
4040
)
4141
return '{}e{}'.format(coefficient, exponent)
4242
else:

docs/releases/2.0.13.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
===========================
2+
Django 2.0.13 release notes
3+
===========================
4+
5+
*February 12, 2019*
6+
7+
Django 2.0.13 fixes a regression in 2.0.12/2.0.11.
8+
9+
Bugfixes
10+
========
11+
12+
* Fixed crash in ``django.utils.numberformat.format_number()`` when the number
13+
has over 200 digits (:ticket:`30177`).

docs/releases/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ versions of the documentation contain the release notes for any later releases.
2525
.. toctree::
2626
:maxdepth: 1
2727

28+
2.0.13
2829
2.0.12
2930
2.0.11
3031
2.0.10

0 commit comments

Comments
 (0)