#5748: Fix rounding issue with floatformat filter --------------------------------------+------------------------------------- Reporter: SmileyChris | Owner: kmtracey Status: assigned | Milestone: Component: Template system | Version: SVN Resolution: | Keywords: Stage: Accepted | Has_patch: 1 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | --------------------------------------+------------------------------------- Changes (by kmtracey):
* owner: PJCrosier => kmtracey * status: new => assigned Comment: It appears this bug is platform-dependent. The added test passes on current code on Windows (Pythons 2.3.5, 2.4.4, 2.5.2, 2.6b2), but fails on Linux (Pythons 2.4, 2.5). Patch as-is doesn't handle some cases correctly (non-ASCII input, NaN and Inf input on Windows prior to Python 2.6). I was going to add tests for these independent of checking in the fix for the rounding error, but some testing on Windows reveals NaN is not handled properly there with current code -- returned value not only doesn't match the string representation of NaN there, but differs from one Python level to another. Use of Decimal as in the patch helps to fix that, so I'm expanding the scope of this ticket to cover both, and will add tests for floatformat given non-ASCII, infinities, and NaN input. -- Ticket URL: <http://code.djangoproject.com/ticket/5748#comment:5> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---