Bug 494886 - python-simplejson on EL-4 has issues with unicode
Summary: python-simplejson on EL-4 has issues with unicode
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: python-simplejson
Version: el4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Luke Macken
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: UpdatePackage
Depends On:
Blocks: 497244
TreeView+ depends on / blocked
 
Reported: 2009-04-08 14:35 UTC by Michael DeHaan
Modified: 2016-09-20 02:39 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-09-17 02:44:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michael DeHaan 2009-04-08 14:35:21 UTC
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).

Thanks!

Comment 1 Luke Macken 2009-04-08 14:43:16 UTC
simplejson 2.0.9 claims to be Python2.4+, which will not work in EL-4, right?

Comment 2 Michael DeHaan 2009-04-08 16:07:01 UTC
I'll run tests in a EL4 VM shortly.

Comment 3 Kyle VanderBeek 2009-06-04 04:16:35 UTC
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).

Comment 4 Kyle VanderBeek 2009-06-11 00:24:25 UTC
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.

Comment 5 Michael DeHaan 2009-06-11 14:36:54 UTC
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:

https://fedorahosted.org/pipermail/cobbler/2009-April/003770.html

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.

Comment 6 Toshio Ernie Kuratomi 2009-07-15 09:08:13 UTC
kylev: what do you think?  Backport or close?

Comment 8 Toshio Ernie Kuratomi 2010-09-17 02:44:56 UTC
Unless someone else specifically needs this, guess we'll close this.


Note You need to log in before you can comment on or make changes to this bug.