
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2008-02-24 14:03 byygale, last changed2022-04-11 14:56 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| sax_character_stream.patch | serhiy.storchaka,2013-02-13 17:47 | Patch for 3.x | review | |
| sax_character_stream-2.7.patch | serhiy.storchaka,2013-02-13 17:48 | Patch for 2.7 | review | |
| sax_character_stream_3.patch | serhiy.storchaka,2015-03-26 07:26 | review | ||
| Messages (10) | |||
|---|---|---|---|
| msg62901 -(view) | Author: Yitz Gale (ygale) | Date: 2008-02-24 14:03 | |
The expat sax parser in xml.sax.expatreaderdoes not fully support the InputSource protocolin xml.sax.xmlreader. It only acceptsbyte streams. It ignores the encodingindicated in the InputStream object andonly uses the encoding read fromthe 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 InputSourceinterface.And most importantly, these limitations should be mentionedin 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 ifyou raise the priority. This bug can causeserious data corruption, or even crashes.It should also be tagged as "easy".An alternative would be to remove the expatsax parser from the libraries, since we don'tsupport it. But that seems a little extreme. | |||
| msg117170 -(view) | Author: Georg Brandl (georg.brandl)*![]() | Date: 2010-09-23 06:45 | |
I'll have a look. | |||
| msg181383 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2013-02-04 19:46 | |
Here is a patch, which made xml.sax.xmlreader and related utilities to support character stream. A lot of new tests added (including Yitz Gale's tests fromissue1483). Some old tests fixed (they were used text stream as byte stream, this doesn't work in general case). | |||
| msg182055 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2013-02-13 17:50 | |
This patch is rather complicated and I doubt whether it is necessary to apply it to the older version. Can anyone review it? | |||
| msg231555 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2014-11-23 12:11 | |
Ping. | |||
| msg239311 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2015-03-26 07:26 | |
Updated to the tip, added whatsnew entry and fixed the documentation.What parts of this patch besides tests are worth to be applied to maintained releases? | |||
| msg239936 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2015-04-02 18:01 | |
New changeset84d49ad9109b by Serhiy Storchaka in branch '2.7':Issue#2175: Added tests for xml.sax.saxutils.prepare_input_source().https://hg.python.org/cpython/rev/84d49ad9109bNew changesetfa47897e7889 by Serhiy Storchaka in branch '3.4':Issue#2175: Added tests for xml.sax.saxutils.prepare_input_source().https://hg.python.org/cpython/rev/fa47897e7889New changesete0292b3ba245 by Serhiy Storchaka in branch 'default':Issue#2175: Added tests for xml.sax.saxutils.prepare_input_source().https://hg.python.org/cpython/rev/e0292b3ba245New changeset407883c52bf3 by Serhiy Storchaka in branch 'default':Issue#2175: SAX parsers now support a character stream of InputSource object.https://hg.python.org/cpython/rev/407883c52bf3 | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:31 | admin | set | github: 46428 |
| 2015-04-02 20:31:57 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2015-04-02 18:01:02 | python-dev | set | nosy: +python-dev messages: +msg239936 |
| 2015-03-26 07:26:06 | serhiy.storchaka | set | files: +sax_character_stream_3.patch messages: +msg239311 |
| 2014-11-23 12:11:48 | serhiy.storchaka | set | keywords: +needs review messages: +msg231555 versions: + Python 3.5, - Python 3.3 |
| 2014-02-03 15:42:18 | BreamoreBoy | set | nosy: -BreamoreBoy |
| 2013-12-18 22:08:55 | serhiy.storchaka | set | nosy: +christian.heimes versions: - Python 3.2 |
| 2013-02-13 21:52:51 | fdrake | set | nosy: +fdrake |
| 2013-02-13 17:52:22 | serhiy.storchaka | link | issue10590 dependencies |
| 2013-02-13 17:50:59 | serhiy.storchaka | set | messages: +msg182055 |
| 2013-02-13 17:48:32 | serhiy.storchaka | set | files: +sax_character_stream-2.7.patch |
| 2013-02-13 17:47:52 | serhiy.storchaka | set | files: +sax_character_stream.patch |
| 2013-02-13 17:47:14 | serhiy.storchaka | set | files: -sax_character_stream.patch |
| 2013-02-04 19:46:21 | serhiy.storchaka | set | files: +sax_character_stream.patch components: - Documentation, Extension Modules versions: + Python 3.4 keywords: +patch nosy: +ezio.melotti messages: +msg181383 stage: patch review |
| 2013-01-31 10:02:25 | serhiy.storchaka | set | dependencies: +Expat parser parses strings only when XML encoding is UTF-8 |
| 2013-01-16 18:26:43 | serhiy.storchaka | set | assignee:docs@python ->serhiy.storchaka nosy: +serhiy.storchaka |
| 2012-01-11 12:31:16 | tshepang | set | nosy: +tshepang |
| 2011-06-12 18:34:16 | terry.reedy | set | versions: + Python 3.3, - Python 3.1 |
| 2010-10-29 10:07:21 | admin | set | assignee:georg.brandl ->docs@python |
| 2010-09-23 06:45:14 | georg.brandl | set | priority: normal -> critical nosy: +georg.brandl messages: +msg117170 assignee:loewis ->georg.brandl |
| 2010-09-20 21:46:26 | ygale | set | status: pending -> open messages: +msg116984 |
| 2010-09-20 21:23:47 | BreamoreBoy | set | status: open -> pending nosy: +BreamoreBoy messages: +msg116975 |
| 2010-06-09 22:00:39 | terry.reedy | set | versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6, Python 2.5, Python 3.0 |
| 2008-03-20 02:42:37 | jafo | set | priority: normal assignee:loewis nosy: +loewis |
| 2008-02-24 14:09:11 | ygale | set | messages: +msg62903 |
| 2008-02-24 14:03:02 | ygale | create | |