json is the python standard lib for json in 2.6+. It is based on
simplejson, which remains a separate lib and advances faster than the
core one (and is also backported to python <2.6). They are very similar,
but apparently there are some gotchas.
I anticipate using json more and more in koji. I guess my question is
whether we should embrace one over the other. Right now, we're trying
json and falling back to simplejson in some client code, but simply
using simplejson in the hub code.
At the moment, we still support RHEL5 as a target (that means python
2.4.3), but I'm hoping to drop that in the nearish future, but in the
meantime that means we need to at least be able to fall back to simplejson.
There are mixed reports on performance. Some say simplejson is much
faster, others say they are roughly comparable.
Also apparently there is a bit of a behavior difference wrt unicode
https://stackoverflow.com/questions/712791/what-are-the-differences-between…https://code.google.com/archive/p/simplejson/issues/40
Hi! As an exercise, I looked in to what it would take to port Koji from PyGreSQL to psycopg2. Turns out, it didn't take much at all:
https://pagure.io/fork/mikeb/koji/c/676db88a8bd4c729278ef4594c9174be5b554b2f
Now, do we think this is a good idea? I haven't done any performance testing, but in general it seems like pycopg2 is better supported. Thoughts?