Re: Dropping django.utils.simplejson

2012-03-30 Thread Mikhail Korobov
Standard python 2.6 json is a bundled and cleaned up simplejson without C extension and pre-26 compatibility - even if json serialization is not a common bottleneck why make things worse? Simplejson and python 2.6 json are arguably the same libraries, I think this is like choosing between cStri

Re: Dropping django.utils.simplejson

2012-03-30 Thread Alex Ogier
I did some timing tests. https://code.djangoproject.com/ticket/18023#comment:5 An order of magnitude difference in JSON serialization time corresponds to an 8% change in total serialization time for a complex model, and 5 deeply nested model instances can be serialized in < 2 ms. It might be a lit

Re: Dropping django.utils.simplejson

2012-03-30 Thread Łukasz Rekucki
On 30 March 2012 13:04, Alex Ogier wrote: > At the same time, I want to reiterate my support for option #1: not > deprecating the > module and leaving the shim in for the foreseeable future. If simplejson is > available on the system, and particularly if it has been compiled with C > extensions,

Re: Dropping django.utils.simplejson

2012-03-30 Thread Alex Ogier
It seems like everyone besides me agrees on option #2 so I implemented it in #18023 ( https://github.com/ogier/django/compare/remove-simplejson ). At the same time, I want to reiterate my support for option #1: not deprecating the module and leaving the

Re: Dropping django.utils.simplejson

2012-03-30 Thread Florian Apolloner
Hi, I am for number 2 too, but don't forget that's deprecation in 1.5 and 1.6 and removal in 1.7 Cheers, Florian -- You received this message because you are subscribed to the Google Groups "Django developers" group. To view this discussion on the web visit https://groups.google.com/d/msg/dj

Re: Dropping django.utils.simplejson

2012-03-29 Thread Alex Gaynor
On Thu, Mar 29, 2012 at 10:06 PM, Alex Ogier wrote: > So in the process of removing simplejson I realized it's not strictly > true that we no longer need to bundle it: if someone uses 2.6+ but has > a 'json' module with a different interface sitting in front of the > system json on sys.path, then

Re: Dropping django.utils.simplejson

2012-03-29 Thread Alex Ogier
So in the process of removing simplejson I realized it's not strictly true that we no longer need to bundle it: if someone uses 2.6+ but has a 'json' module with a different interface sitting in front of the system json on sys.path, then Django currently falls back to bundled simplejson. I don't kn

Re: Dropping django.utils.simplejson

2012-03-29 Thread Alex Ogier
There's still a ~20x performance gain over 2.6's stdlib by using simplejson even without C-extensions according to http://bugs.python.org/issue6013. Depending on how heavily people depend on the module, removing simplejson may be a "backwards incompatibility" in the sense that performance may nosed

Re: Dropping django.utils.simplejson

2012-03-29 Thread Russell Keith-Magee
Option 2 looks best to me. There's no reason for us to ship JSON any more, but we should still guide people through the transition process. Yours, Russ Magee %-) On 30/03/2012, at 7:07 AM, Łukasz Rekucki wrote: > Alex's comment on ticket #18013 reminded me of this. Is there any > reason not to

Re: Dropping django.utils.simplejson

2012-03-29 Thread Alex Gaynor
On Thu, Mar 29, 2012 at 6:07 PM, Łukasz Rekucki wrote: > Alex's comment on ticket #18013 reminded me of this. Is there any > reason not to get rid of the Django's version of simplejson now that > Python 2.6 always has the json module? > > I see three options here: > > 1) Remove Django's copy and

Dropping django.utils.simplejson

2012-03-29 Thread Łukasz Rekucki
Alex's comment on ticket #18013 reminded me of this. Is there any reason not to get rid of the Django's version of simplejson now that Python 2.6 always has the json module? I see three options here: 1) Remove Django's copy and only leave the simplejson/json fallback. 2) Above, plus deprecate "dj