[issue16922] ElementTree.findtext() returns empty bytes object instead of empty string
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file28675/etree_finditer_empty-3.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16922] ElementTree.findtext() returns empty bytes object instead of empty string
Serhiy Storchaka added the comment: Indeed. Patch updated. -- Added file: http://bugs.python.org/file28711/etree_finditer_empty-3.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16922] ElementTree.findtext() returns empty bytes object instead of empty string
Roundup Robot added the comment: New changeset 849eb27baf1c by Eli Bendersky in branch '3.2': Issue #16922: fixed findtext() to return empty Unicode string instead of empty bytes object when there's no text. http://hg.python.org/cpython/rev/849eb27baf1c New changeset 6323e5f1ed81 by Eli Bendersky in branch '3.3': Issue #16922: fixed findtext() to return empty Unicode string instead of empty bytes object when there's no text. http://hg.python.org/cpython/rev/6323e5f1ed81 New changeset c38423931724 by Eli Bendersky in branch 'default': Issue #16922: fixed findtext() to return empty Unicode string instead of empty bytes object when there's no text. http://hg.python.org/cpython/rev/c38423931724 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16922] ElementTree.findtext() returns empty bytes object instead of empty string
Changes by Eli Bendersky eli...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16922] ElementTree.findtext() returns empty bytes object instead of empty string
Eli Bendersky added the comment: The fix looks good, but please don't add tests to the doctests - they are deprecated (from 3.3) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16922] ElementTree.findtext() returns empty bytes object instead of empty string
Serhiy Storchaka added the comment: But all findtext tests are doctests and I want to keep the tests together. I think there should be separated issue for converting ElementTree doctests to unittests. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16922] ElementTree.findtext() returns empty bytes object instead of empty string
Eli Bendersky added the comment: Serhiy, indeed - that's issue #15083. But since rewriting all tests is a large task no one is willing to take at this point, my strategy has been incremental: rewrite a chunk at a time when tests are being touched. Just adding new doctests goes against the desired direction. I'll convert the findtext tests to unittest in 3.3 and default and then you can add your new tests in the proper place. Stay tuned. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16922] ElementTree.findtext() returns empty bytes object instead of empty string
Eli Bendersky added the comment: Tests ported in 3.3 and 3.4 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16922] ElementTree.findtext() returns empty bytes object instead of empty string
Serhiy Storchaka added the comment: Here is a patch for 3.3+. -- Added file: http://bugs.python.org/file28708/etree_finditer_empty-3.3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16922] ElementTree.findtext() returns empty bytes object instead of empty string
Eli Bendersky added the comment: PyUnicode_New has been added in 3.3, so the 3.2 patch doesn't compile. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16922] ElementTree.findtext() returns empty bytes object instead of empty string
New submission from Serhiy Storchaka: import xml.etree.cElementTree as ET ET.XML('rootempty //root').findtext('empty') b'' -- components: XML files: etree_finditer_empty.patch keywords: patch messages: 179580 nosy: eli.bendersky, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: ElementTree.findtext() returns empty bytes object instead of empty string type: behavior versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28675/etree_finditer_empty.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16922] ElementTree.findtext() returns empty bytes object instead of empty string
Serhiy Storchaka added the comment: I see yet one possible bug, using PyBytes_FromString() in list_join() on 3.2. But I can't demonstrate an example. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com