Hey, just wondering. Don't we want to convert from bytes to string in Py3.x because of the string issue from Py3.x? and with Django, it expects str everywhere in Py2.x (where necessary). If the comment "write() argument must be string" was there from the beginning, then Django would expect a str, not bytes -- i.e., your fix would crash Django in Py2.x. Correct me if I'm wrong.
But a StringIO is involved.. which only eats unicode X(