This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients docs@python, ezio.melotti, mjpieters, petri.lehtinen, pitrou, python-dev, rhettinger, socketpair, terry.reedy
Date 2014-10-23.17:20:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1414084808.95.0.532084502914.issue13769@psf.upfronthosting.co.za>
In-reply-to
Content
The revised doc admits the problem: "If *ensure_ascii* is False, some chunks written to *fp* may be unicode instances.  Unless fp.write() explicitly understands unicode (as in codecs.getwriter) this is likely to cause an error."

Making text be unicode in 3.x is our attempt at a generic fix to the problems resulting from the bug-prone 2.x 'text may be bytes or unicode' design.  Since continued 2.7 support is aimed at supporting legacy code, we are very reluctant to make behavior changes that could break working code.
History
Date User Action Args
2014-10-23 17:20:09terry.reedysetrecipients: + terry.reedy, rhettinger, mjpieters, pitrou, ezio.melotti, docs@python, socketpair, python-dev, petri.lehtinen
2014-10-23 17:20:08terry.reedysetmessageid: <1414084808.95.0.532084502914.issue13769@psf.upfronthosting.co.za>
2014-10-23 17:20:08terry.reedylinkissue13769 messages
2014-10-23 17:20:08terry.reedycreate