[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-05-22 Thread Eli Bendersky
Eli Bendersky added the comment: Agreed re 2.7; the problem is not important enough to warrant such a backport, due to the state of maintenance of 2.7 at this point. -- ___ Python tracker _

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Due to the fact that ElementTree's documentation doesn't promise parsing Unicode string perhaps it shouldn't be backported to 2.7. At least I hadn't backported corresponded pyexpat changes (which affects pure Python ElementTree) to 2.7. -- assignee:

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, 2.7 still uses old doctests. It's a challenge to backport tests for this issue. -- versions: -Python 3.2 ___ Python tracker ___

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-05-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7781ccae7b9a by Serhiy Storchaka in branch '3.3': Issue #16986: ElementTree now correctly parses a string input not only when http://hg.python.org/cpython/rev/7781ccae7b9a New changeset 659c1ce8ed2f by Serhiy Storchaka in branch 'default': Issue #16

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-05-22 Thread Eli Bendersky
Eli Bendersky added the comment: LGTM -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is an updated patch. -- Added file: http://bugs.python.org/file30341/etree_parse_str_2.patch ___ Python tracker ___ _

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-03-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Eli, this issue no longer has open pre-requisites. Issue10590 was replaced by issue17089 which closed now. Issue17089 fixed Python interface to expat parser, but cElementTree uses C interface of expat directly and the proposed pathes fix it. -- ___

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch for C implementation. Python implementation was fixed in issue17089. -- dependencies: +Expat parser parses strings only when XML encoding is UTF-8 -Parameter type error for xml.sax.parseString(string, ...) keywords: +patch Added file:

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-01-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch for issue10590 fixes this for Python implementation of ElementTree, but not for C implementation. -- dependencies: +Parameter type error for xml.sax.parseString(string, ...) ___ Python tracker

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-01-17 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: >>> import xml.etree.ElementTree >>> data = '\n>> value="$\xa3\u20ac\U0001017b">$\xa3\u20ac\U0001017b' >>> xml.etree.ElementTree.tostring(xml.etree.ElementTree.fromstring(data), >>> 'unicode') '$£â\x82¬ð\x90\x85»' -- components: XML messages: 18014