#16850: Testsuite failing on JSON serialization
-------------------------------------+-------------------------------------
Reporter: Raphael Hertzog | Owner: nobody
<hertzog@…> | Status: new
Type: Bug | Version: 1.3
Component: Core | Resolution:
(Serialization) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by ramiro):
Replying to [comment:4 ramiro]:
> There is something strange in the fact that testing things with Python
2.7 (I also use Debian unstable, Python 2.7 has recently entered Sid) and
the same simplejson 2.2.0 version (provided by debian python-simplejson
DEB package) doesn't show these failures.
>
> Just to be sure, I ran the serializers tests with Python 2.6 in the same
system and I see the reported failures.
>
> Maybe Python 2.6 also has something to do with this?
The reason for this is because additionally the version of Decimal shipped
with Python 2.7 has a new `Decimal.from_float()` method that gets used
during decoding from JSON operations instead or raising the error reported
with Python 2.6 by the OP. This method can lose precision and neither we
nor simplejson can control that.
This seems to be an additional reason to keep using strings to encode
Decimal's
--
Ticket URL: <https://code.djangoproject.com/ticket/16850#comment:5>
Django <https://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 [email protected].
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.