http://bugs.python.org/review/1470548/diff/5039/Lib/xml/sax/saxutils.py
File Lib/xml/sax/saxutils.py (right):
http://bugs.python.org/review/1470548/diff/5039/Lib/xml/sax/saxutils.py#newco...
Lib/xml/sax/saxutils.py:18: _error_handling = "strict"
On 2012/05/30 19:06:39, loewis wrote:
> I think this variable _error_handling can go, and its only use be replaced by
> "xmlcharrefreplace".
I suspected this, but wanted to know your opinion, as the author of this code.
http://bugs.python.org/review/1470548/diff/5039/Lib/xml/sax/saxutils.py#newco...
Lib/xml/sax/saxutils.py:82: def __init__(self, out=None, encoding=None,
short_empty_elements=False):
On 2012/05/30 19:06:39, loewis wrote:
> Why do you drop the default value for encoding? XMLGenerator certainly needs
to
> continue to create bytes by default. It's documented to default to
iso-8859-1,
> so I see no reason to change it.
In Python 3 XMLGenerator creates unicode string by default. Output to StringIO
is used in the tests and may often used in third-party code. I have kept this
behavior.
encoding="iso-8859-1" is bad choice by default for output to sys.stdout (the
default value for an out). Will be better to use "us-ascii" or encoding of a
sys.stdout.
In any case, something has to change.
http://bugs.python.org/review/1470548/diff/5409/Lib/test/test_sax.py File Lib/test/test_sax.py (right): http://bugs.python.org/review/1470548/diff/5409/Lib/test/test_sax.py#newcode165 Lib/test/test_sax.py:165: result = BytesIO() Is output to a StringIO still ...