[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16 or UTF-8)

2013-03-31 Thread Sebastian Ortiz Vasquez
Sebastian Ortiz Vasquez added the comment: I have been working with this in order to generate an RSS feed using web2py. I found, XMLGenerator method does not validate if is an unicode or string type, and it does not encode accord the encoding parameter of the XMLGenerator. I added changed the

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2013-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2013-02-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1c03e499cdc2 by Serhiy Storchaka in branch '3.2': Issue #1470548: Add test for fragment producing with XMLGenerator. http://hg.python.org/cpython/rev/1c03e499cdc2 New changeset 5a4b3094903f by Serhiy Storchaka in branch '3.3': Issue #1470548: Add te

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2013-02-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset d707e3345a74 by Serhiy Storchaka in branch '2.7': Issue #1470548: Do not buffer XMLGenerator output. http://hg.python.org/cpython/rev/d707e3345a74 -- ___ Python tracker

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2013-02-24 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: This patch works for me. -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2013-02-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for report. Here is a patch which fixes this bug. -- Added file: http://bugs.python.org/file29218/XMLGenerator_fragment-2.7.patch ___ Python tracker _

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2013-02-23 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: The change in 2.7 branch breaks some software, including a test of Django (produce_xml_fragment from https://github.com/django/django/blob/1.4.5/tests/regressiontests/test_utils/tests.py). The problem seems to not occur with Python 3.2, 3.3

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2013-02-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2013-02-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 010b455de0e0 by Serhiy Storchaka in branch '2.7': Issue #1470548: XMLGenerator now works with UTF-16 and UTF-32 encodings. http://hg.python.org/cpython/rev/010b455de0e0 New changeset 66f92f76b2ce by Serhiy Storchaka in branch '3.2': Issue #1470548:

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2013-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated. Now I get rid of __del__ to prevent hanging on reference cicles as Antoine suggested on IRC. Added test for check that XMLGenerator doesn't close the file passed as argument. -- Added file: http://bugs.python.org/file28797/XMLGenerator

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2013-01-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2013-01-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated. Fixed an error which Georg have found. Restored testing XMLGenerator with StringIO as Antoine pointed. Now XMLGenerator tested for StringIO, BytesIO and an user writer. Added tests for encoding. -- keywords: -easy Added file: http://b

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-12-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: patch review -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-12-27 Thread Georg Brandl
Georg Brandl added the comment: I'd like Antoine to have a look at all that io stuff. It looks quite bloated. In your except clause, you're not calling self._close. -- nosy: +pitrou ___ Python tracker __

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-12-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-12-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If no one objects I will commit this next year. -- ___ Python tracker ___ ___ Python-bugs-list m

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If nobody has any objections, why not apply this patch? -- ___ Python tracker ___ ___ Python-bug

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-10-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +needs review stage: test needed -> versions: +Python 3.4 -Python 3.1 ___ Python tracker ___ ___

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-10-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-07-19 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: -eli.bendersky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-07-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is updated patch with more careful handling of closing (as for issue1767933) and added comments. -- nosy: +eli.bendersky Added file: http://bugs.python.org/file26385/XMLGenerator-3.patch ___ Python tracker <

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-06-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It would be nice to fix this bug before forking of the 3.3.0b1 release clone. -- ___ Python tracker ___ ___

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-06-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch updated to reflect Martin's comments. I hope the old behavior now preserved in the most used in practice cases. Tests converted to work with bytes instead of strings. -- Added file: http://bugs.python.org/file26011/XMLGenerator-2.patch __

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-05-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, I see XMLGenerator completely outdated. It even has not been ported to Python 3. See function _write: def _write(self, text): if isinstance(text, str): self._out.write(text) else: self._out.write(text.encode(se

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-05-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-05-28 Thread Walter Dörwald
Walter Dörwald added the comment: An alternative would be to use an incremental encoder instead of a StreamWriter. (Which is what TextIOWrapper does internally). -- nosy: +doerwalter ___ Python tracker

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-05-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue1767933. Instead of codecs.StreamWriter better to use io.TextIOWrapper, because the first is slower and has numerous flaws. -- nosy: +storchaka versions: +Python 3.3 ___ Python tracker

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2010-08-22 Thread Mark Lawrence
Mark Lawrence added the comment: The are no unit test or doc changes with the patch. Can anyone answer Georg's question on msg66684? -- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2009-03-20 Thread Daniel Diniz
Changes by Daniel Diniz : -- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 ___ Python tracker ___ ___

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2008-05-11 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Won't this present backwards-compatibility problems if non-ASCII str content is written? -- nosy: +georg.brandl _ Tracker <[EMAIL PROTECTED]> ___

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2008-01-21 Thread A.M. Kuchling
Changes by A.M. Kuchling: -- keywords: +easy _ Tracker <[EMAIL PROTECTED]> _ ___ Python-bugs-list mailing list Unsubscribe: http://