classification
Title: Expat sax parser silently ignores the InputSource protocol
Type: behavior Stage:
Components: Documentation, Extension Modules, Library (Lib), Unicode, XML Versions: Python 3.3, Python 3.2, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: BreamoreBoy, georg.brandl, loewis, tshepang, ygale
Priority: critical Keywords:

Created on 2008-02-24 14:03 by ygale, last changed 2012-01-11 12:31 by tshepang.

Messages (5)
msg62901 - (view) Author: Yitz Gale (ygale) Date: 2008-02-24 14:03
The expat sax parser in xml.sax.expatreader
does not fully support the InputSource protocol
in xml.sax.xmlreader. It only accepts
byte streams. It ignores the encoding
indicated in the InputStream object and
only uses the encoding read from
the XML or defaults to UTF-8.

Rather than silently doing the wrong thing,
it should raise an error when fed a character stream,
or when given an encoding, via the InputSource
interface.

And most importantly, these limitations should be mentioned
in the documentation.
msg62903 - (view) Author: Yitz Gale (ygale) Date: 2008-02-24 14:09
See also: #1483 and #2174.
msg116975 - (view) Author: Mark Lawrence (BreamoreBoy) Date: 2010-09-20 21:23
As nobody appears to be interested I'll close this in a couple of weeks unless someone objects.
msg116984 - (view) Author: Yitz Gale (ygale) Date: 2010-09-20 21:46
Perhaps more people would be interested if
you raise the priority. This bug can cause
serious data corruption, or even crashes.
It should also be tagged as "easy".

An alternative would be to remove the expat
sax parser from the libraries, since we don't
support it. But that seems a little extreme.
msg117170 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-09-23 06:45
I'll have a look.
History
Date User Action Args
2012-01-11 12:31:16tshepangsetnosy: + tshepang
2011-06-12 18:34:16terry.reedysetversions: + Python 3.3, - Python 3.1
2010-10-29 10:07:21adminsetassignee: georg.brandl -> docs@python
2010-09-23 06:45:14georg.brandlsetpriority: normal -> critical

nosy: + georg.brandl
messages: + msg117170

assignee: loewis -> georg.brandl
2010-09-20 21:46:26ygalesetstatus: pending -> open

messages: + msg116984
2010-09-20 21:23:47BreamoreBoysetstatus: open -> pending
nosy: + BreamoreBoy
messages: + msg116975

2010-06-09 22:00:39terry.reedysetversions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6, Python 2.5, Python 3.0
2008-03-20 02:42:37jafosetpriority: normal
assignee: loewis
nosy: + loewis
2008-02-24 14:09:11ygalesetmessages: + msg62903
2008-02-24 14:03:02ygalecreate