#17548 closed New feature (wontfix)
updated simplejson version
Reported by: | rm_ | Owned by: | nobody |
---|---|---|---|
Component: | Core (Serialization) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
It would be nice to have a bundled simplejson version that supports the use_decimal feature which has been added in version 2.1.0.
import simplejson as json
from decimal import Decimal
json.loads('1.1', use_decimal=True) == Decimal('1.1')
True
json.dumps(Decimal('1.1'), use_decimal=True) == '1.1'
True
Change History (3)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
The copy of simplejson we bundle is for internal use in the (de)serializer code. We are well server by the version we currently include and we force use of decimal=True
because it can introduce problems (see #16850, r17228 and r17229)
I'm going to wontfix this ticket because:
- I don't think users should be relying on specific versions of libraries we bundle, and
- Django shouldn't be the vehicle for users getting versions of these libraries newer than the ones available in the platform especially if its for uses outside of the ORM model serialziation/deserialziation functionality like calling
.loads()
and
dumps()
directly. It is out of scope and that's what tools like virtualenv and such are for.
comment:3 by , 13 years ago
Also, note that we will remove the bundled copy after the 1.4 release, since Python >= 2.6 includes the "json" module.
example code: