Re: [Django] #34098: Filter floatformat drops precision in decimal numbers

2022-10-24 Thread Django
#34098: Filter floatformat drops precision in decimal numbers
-+-
 Reporter:  Vlastimil Zíma   |Owner:  Vlastimil
 |  Zíma
 Type:  Bug  |   Status:  closed
Component:  Template system  |  Version:  dev
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by GitHub ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"08c5a787262c1ae57f6517d4574b54a5fcaad124" 08c5a787]:
 {{{
 #!CommitTicketReference repository=""
 revision="08c5a787262c1ae57f6517d4574b54a5fcaad124"
 Fixed #34098 -- Fixed loss of precision for Decimal values in floatformat
 filter.

 Regression in 12f7928f5a455e330c0a7f19bc86b37baca12811.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018409a62b85-277f7bed-9ca1-40cf-a3bc-f1a3ba7f917b-00%40eu-central-1.amazonses.com.


Re: [Django] #34098: Filter floatformat drops precision in decimal numbers

2022-10-24 Thread Django
#34098: Filter floatformat drops precision in decimal numbers
-+-
 Reporter:  Vlastimil Zíma   |Owner:  Vlastimil
 |  Zíma
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * stage:  Accepted => Ready for checkin


Comment:

 Regression in 12f7928f5a455e330c0a7f19bc86b37baca12811.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070184099ec480-c3e2a5b8-42d3-4d79-8eaa-74195132be36-00%40eu-central-1.amazonses.com.


Re: [Django] #34098: Filter floatformat drops precision in decimal numbers

2022-10-16 Thread Django
#34098: Filter floatformat drops precision in decimal numbers
-+-
 Reporter:  Vlastimil Zíma   |Owner:  Vlastimil
 |  Zíma
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Vlastimil Zíma):

 * owner:  nobody => Vlastimil Zíma
 * status:  new => assigned


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070183e4851b6f-0caa61f4-7b24-4535-a70a-40e1473015dd-00%40eu-central-1.amazonses.com.


Re: [Django] #34098: Filter floatformat drops precision in decimal numbers

2022-10-14 Thread Django
#34098: Filter floatformat drops precision in decimal numbers
-+
 Reporter:  Vlastimil Zíma   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Template system  |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by Mariusz Felisiak):

 * stage:  Unreviewed => Accepted


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070183d7fa156e-0d8e9377-ce47-4b01-a1c6-f383e7c50ae7-00%40eu-central-1.amazonses.com.


[Django] #34098: Filter floatformat drops precision in decimal numbers

2022-10-14 Thread Django
#34098: Filter floatformat drops precision in decimal numbers
---+
   Reporter:  Vlastimil Zíma   |  Owner:  nobody
   Type:  Bug  | Status:  new
  Component:  Template system  |Version:  dev
   Severity:  Normal   |   Keywords:
   Triage Stage:  Unreviewed   |  Has patch:  1
Needs documentation:  0|Needs tests:  0
Patch needs improvement:  0|  Easy pickings:  0
  UI/UX:  0|
---+
 I discovered that `floatformat` template filter may drop precision when
 used for `Decimal` numbers.

 MWE:
 {{{
 #!python
 from decimal import Decimal

 from django import setup
 from django.conf import settings
 from django.template import Template, Context

 TEMPLATES = [
 {
 'BACKEND': 'django.template.backends.django.DjangoTemplates',
 },
 ]
 settings.configure(TEMPLATES=TEMPLATES)
 setup()

 t = Template('{{ value|floatformat:20 }}')
 c = Context({'value': Decimal('42.12345678901234567890')})
 print(t.render(c))  #>>> 42.1234567890123440
 }}}

 I traced the bug to incorrect conversion to `Decimal` within the
 `floatformat` implementation that can't really work for `Decimal` numbers.
 `Decimal` numbers are converted to float instead.

 Pull request is prepared https://github.com/django/django/pull/15863

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070183d674bead-765279de-2713-4d5d-bd48-c8759f0a31ae-00%40eu-central-1.amazonses.com.