Alexey Borzenkov added the comment:

Didn't need to bisect, it's very easy to find the problematic commit, since 
writelines doesn't change that often:

https://hg.python.org/releases/2.7.11/rev/db842f730432

The old code was buggy in a sense that it always called PyObject_AsCharBuffer 
due to the way the condition is structured, but this bugginess was what allowed 
it to work correctly with unicode objects. After the commit unicode objects are 
treated like any other buffer, and that's why internal UCS2 or UCS4 
representation gets written to the file.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27154>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to