matthiask / plata

Plata - the lean and mean Django-based Shop
https://plata-django-shop.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
197 stars 63 forks source link

Simplejson dependency in Python 2.6+ #43

Closed pnordahl closed 11 years ago

pnordahl commented 11 years ago

Since Python 2.6 provides the native 'json' module, would Plata be able to use that instead of enforcing the 'simplejson' dependency in environments that can use the native json module?

matthiask commented 11 years ago

Unfortunately no: simplejson supports an additional use_decimal parameter which automatically uses decimals instead of floats everywhere, and I haven't found a way to implement the same behavior throughout with 2.6's json module yet.

arteme commented 11 years ago

Doesn't Django package provide bundled simplejson via "django.utils.simplejson"?

matthiask commented 11 years ago

@arteme not anymore. https://github.com/django/django/blob/master/django/utils/simplejson.py

Additionally, the included version was too old (2.0.7), because we need at least simplejson 2.1.

pnordahl commented 11 years ago

Gotcha. Thanks for looking into it!