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 scoder
Recipients eli.bendersky, maker, mmokrejs, r.david.murray, scoder, serhiy.storchaka
Date 2013-08-28.09:32:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> I think the point here is clarifying whether xml expect text or just a byte string. In case that's a stream of byte, I agree with you, is more a "behaviour" problem.

XML is *defined* as a stream of bytes.

Regarding the API side in ElementTree, Py2 accepts byte strings and Py3 requires Unicode strings. Py2 will not change in that regard, and I can't see this being a serious enough issue to change the ET-API there, so IMHO we can ignore Py2.x completely for this issue. (changing ticket accordingly)

However, Py3 will happily write out control characters if they appear in the Unicode text string, so the issue is the same there. A fix for Py3 would be to add an input validation step, preferably at serialisation time.
Date User Action Args
2013-08-28 09:32:39scodersetrecipients: + scoder, mmokrejs, r.david.murray, eli.bendersky, maker, serhiy.storchaka
2013-08-28 09:32:39scodersetmessageid: <>
2013-08-28 09:32:39scoderlinkissue18850 messages
2013-08-28 09:32:38scodercreate