Red Hat Bugzilla – Bug 494886
python-simplejson on EL-4 has issues with unicode
Last modified: 2016-09-19 22:39:42 EDT
python-simplejson 2.0.9 (per cobbler-list) fixes a unicode problem on EL4 where strings are encoded correctly (as regular strings) but decoded in a weird way where instead of u'foo', they return 'ufoo'. EL 5 does not seem to be affected.
Currently the version of simplejson in EL 5 is newer than EL4, but in general everything would benefit from bumping all Fedora and EPEL versions to the same version of simplejson (2.0.9 is what's available via ez_install).
simplejson 2.0.9 claims to be Python2.4+, which will not work in EL-4, right?
I'll run tests in a EL4 VM shortly.
lmacken: I need simplejson >= 2.0.8 in F-11 and rawhide to be able to update to the release version of Pylons 0.9.7.
(Feel free to add me as a committer if you want me to do it for Fedora).
Unfortunately, most of simplejson requires now requires python 2.4 (particularly the test suite, annoyingly). It'll be a non-trivial backport to EL-4, but I'll look into it.
In the meantime, Michael, if you can provide me with an URL or information regarding the particular bug being discussed, perhaps I can back-port a patch to fix the particular test case/bug that people are bothered with.
Kyle, various emails to Cobbler list, I'm not sure where it is discussed upstream since this has been a long time since I posted the original bug report (two months).
Some of it:
I've since worked around the problem simply by not using simplejson on EL-4 (and using yaml there instead), which is slower, but avoids the problems with encodings.
Basically if you decode normal looking documents even if specifying the encoding types it will return botched unicode types. Rather than u"foo", it will actually be "ufoo".
Sorry, that's all I have since it's been too long since the workaround.
I suppose you could close this if you want.
kylev: what do you think? Backport or close?
Unless someone else specifically needs this, guess we'll close this.