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 Arfrever
Recipients Arfrever, BreamoreBoy, benjamin.peterson, doerwalter, georg.brandl, larry, loewis, ngrig, pitrou, python-dev, serhiy.storchaka
Date 2013-02-23.20:50:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1361652630.99.0.891129664543.issue1470548@psf.upfronthosting.co.za>
In-reply-to
Content
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 and 3.4.

Before 010b455de0e0:
>>> from StringIO import StringIO
>>> from xml.sax.saxutils import XMLGenerator
>>> stream = StringIO()
>>> xml = XMLGenerator(stream, encoding='utf-8')
>>> xml.startElement("foo", {"aaa": "1.0", "bbb": "2.0"})
>>> xml.characters("Hello")
>>> xml.endElement("foo")
>>> xml.startElement("bar", {"ccc": "3.0", "ddd": "4.0"})
>>> xml.endElement("bar")
>>> stream.getvalue()
'<foo aaa="1.0" bbb="2.0">Hello</foo><bar ccc="3.0" ddd="4.0"></bar>'
>>>

After 010b455de0e0:
>>> from StringIO import StringIO
>>> from xml.sax.saxutils import XMLGenerator
>>> stream = StringIO()
>>> xml = XMLGenerator(stream, encoding='utf-8')
>>> xml.startElement("foo", {"aaa": "1.0", "bbb": "2.0"})
>>> xml.characters("Hello")
>>> xml.endElement("foo")
>>> xml.startElement("bar", {"ccc": "3.0", "ddd": "4.0"})
>>> xml.endElement("bar")
>>> stream.getvalue()
''
>>>
History
Date User Action Args
2013-02-23 20:50:31Arfreversetrecipients: + Arfrever, loewis, doerwalter, georg.brandl, ngrig, pitrou, larry, benjamin.peterson, BreamoreBoy, python-dev, serhiy.storchaka
2013-02-23 20:50:30Arfreversetmessageid: <1361652630.99.0.891129664543.issue1470548@psf.upfronthosting.co.za>
2013-02-23 20:50:30Arfreverlinkissue1470548 messages
2013-02-23 20:50:30Arfrevercreate