Depend on simplejson for Python < 2.7#47
Depend on simplejson for Python < 2.7#47patricklucas wants to merge 1 commit intoYelpArchive:developfrom
Conversation
This adds a dependency on simplejson for Python < 2.7 and moves the stanza to import the appropriate json module into pyleus.compat. Closes YelpArchive#46
There was a problem hiding this comment.
In this way we are preventing the use of simplejson for python 2.7 and 3.x, right? I know that a try/catch import here misses the point of this change (even though it would still simplify all other modules), but I feel we are losing something that might be useful (e.g. from my measurements, simplejson seemed to achieve lower latencies than json while processing tuples).
Nevertheless, I don't want to block the pull request for such an issue, since we ship messagepack as default encoding format and simplejson has problems too (https://code.google.com/p/simplejson/issues/detail?id=40). I just wanted to point it out.
There was a problem hiding this comment.
Did you do that test on 2.7? My understanding was that the real performance benefit was on 2.6, but that come 2.7 it was negligible since the relevant improvements had been mainlined.
|
Mmm, why Travis' build status is missing on this request? |
|
Because Travis misses some PRs for some reason. :/ I'm going to modulate this branch to "just" move the try/except into compat.py for now. |
|
@poros This has mereg conflicts, can you fix it up? |
|
My concerns about json vs simplejson performances in Python 2.7 are actually fading out. If @plucas is up for it, we may want to unblock this pull request and go ahead with the merge. |
This adds a dependency on simplejson for Python < 2.7 and moves the
stanza to import the appropriate json module into pyleus.compat.
Closes #46