This problem was gonna have to be eventually sorted through no matter what: the endgame was decided to be "json from the standard library everywhere" which means any projects doing simplejson.dumps([django internals]) would inevitably be affected sooner or later. In theory it's just as distasteful and wrong to perform simplejson.dumps(...., cls=json.JSONEncoder) as it is to perform json.dumps(...., cls=simplejson.JSONEncoder), however due to the practical concern that for the time being the latter works and the former doesn't, it might have been worth keeping a shim specifically when subclassing JSONEncoder. Of course, there's no guarantee that future releases of simplejson won't make the latter every bit as broken, and eventually Django core is going to require that everyone who uses Django internals use json instead of simplejson anyways, so it's of dubious benefit, and I don't think it's worth re-adding.
Best, Alex Ogier On Sat, Apr 13, 2013 at 5:34 PM, Aymeric Augustin < [email protected]> wrote: > On 13 avr. 2013, at 22:13, Jeremy Dunck <[email protected]> wrote: > > > After reading that ticket, I'm not sure what Alex and I are > > disagreeing on. I was suggesting using django.utils.simplejson > > internally until it's removed, so that at least people could be > > consistent with django itself. That way, DjangoJSONEncoder would be a > > simplejson.JSONEncoder (if simplejson is installed) until we remove > > the shim. > > I see — I hadn't understood that you were proposing this. > > > Anyway, since we've already deprecated utils.simplejson, since we've > > already done the damage here, and since doing a release to fix this is > > probably not going to help that many people (they've either already > > fixed their backwards-incompat or aren't planning on going to 1.5 any > > time soon)... maybe I agree we should leave it alone. > > > Yes, maybe we could have handled this differently, but at this point the > cure would be worse than the disease :| > > -- > Aymeric. > > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-developers?hl=en > . > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
