[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Pulp-list] f17 and simplejson





On 06/11/2012 08:01 PM, Nick Coghlan wrote:
On 06/09/2012 07:21 AM, Jeff Ortel wrote:
Fedora 17 GOLD includes python-simplejson-2.3.0-2.fc17.  In simplejson
2.2, support for namedtuples was added.  In doing so, a bug was
introduced that causes JSON serialization errors in gofer<= 0.68.  A
description and trace can be found in bugzilla 829767.

This issue has been addressed in gofer 0.69.  The basic change is
re-parenting (messaging) Envelope&  Options classes to 'object' rather
than 'dict'.  Then, translating the envelope (as needed) to 'dict'
during serialization.  This is a better approach anyway since overriding
__getattr__&  __setattr__ on a subclass of dict opens the door for name
collisions with native dict attributes.

This issue has *also* been addressed in simplejson 2.5.2 which is
available in F17 (updates).  I intend to update (pulp) rpm/gofer to 0.69
on master to be included in the today's QE build (dev/testing). However,
since it appears that doing a 'yum update python-simplejson' is a viable
workaround, I don't plan to update rpm/gofer on pulp_v1 (v1/testing) at
this time.  I'd like to get some miles on gofer 0.69 running with v2 first.

So, on F17, if you're seeing this issue, do

# yum update python-simplejson

to be sure you have the latest (python-simplejson-2.5.2-1.fc17) and you
should be good-to-go.  Remember to bounce goferd and httpd.  If you
continue to see any issues, please let me know.

Have you considered just dropping the simplejson dependency on platforms
that provide Python 2.6+? Or are there specific simplejson features that
Pulp uses that weren't included when simplejson was added to the stdlib
as the json module in 2.6?

I have considered this (and still might do it) but since the json module in python 2.6+ /is/ simplejson (although older), I think this issue would still bit us in the future when the json module is caught up to simplejson 2.2+. Since we need to support python 2.4, it seemed simpler to just require simplejson for now instead of using the conditional import in code and conditional Requires in the gofer.spec.


Cheers,
Nick.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]