[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2012-10-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2012-08-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> duplicate superseder: -> Bugfix for #1470540 (XMLGenerator cannot output UTF-16) ___ Python tracker ___ _

[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2012-07-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This issue will be fixed by patch for issue1470548. -- nosy: +storchaka ___ Python tracker ___ ___

[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2009-08-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: You shouldn't remove the defaulting behaviour for `out`, but use `sys.stdout.buffer` instead. Bonus points if you add a test so that this kind of bug doesn't go unnoticed again. PS: it's ironic that the default encoding here is iso-8859-1. This piece of code i

[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2009-07-22 Thread Craig Holmquist
Changes by Craig Holmquist : Removed file: http://bugs.python.org/file14541/xmlgen.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2009-07-22 Thread Craig Holmquist
Craig Holmquist added the comment: Patch for documentation. -- Added file: http://bugs.python.org/file14545/xmlgen-doc.patch ___ Python tracker ___ __

[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2009-07-22 Thread Craig Holmquist
Craig Holmquist added the comment: This new patch removes the "default to stdout" behavior. -- Added file: http://bugs.python.org/file14544/xmlgen2.patch ___ Python tracker ___ _

[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2009-07-22 Thread Craig Holmquist
Craig Holmquist added the comment: Actually, that patch may not work so well either... out defaults to sys.stdout, but that can't accept bytes. -- ___ Python tracker ___

[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2009-07-22 Thread Craig Holmquist
Craig Holmquist added the comment: Patch attached. This patch doesn't actually restrict the output object to RawIOBase (that wouldn't work well, since files opened as binary are actually derived from BufferedIOBase). Instead, it just assumes the output object has a 'write' method that accepts

[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2009-07-22 Thread Craig Holmquist
Craig Holmquist added the comment: To clarify the specific problem: - If the file object passed to XMLGenerator is opened in binary mode, XMLGenerator raises TypeError as soon as it tries to write to it - If the passed file object is opened in text mode, XMLGenerator writes the prescribed encod

[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2009-01-19 Thread HiroakiKawai
New submission from HiroakiKawai : xml.sax.saxutils.XMLGenerator._write tests the argument by isinstance(text, str), but this is problematic in Python 3.0. XMLGenerator accepts encoding and the produced file is encoded by that encoding, i.e., the XML is a binary sequence. So IMHO, the XMLGener