[issue14849] C implementation of ElementTree: Inheriting from Element breaks text member
Eli Bendersky eli...@gmail.com added the comment: Here's a simpler testcase: import xml.etree.ElementTree as ET class XElement(ET.Element): def __init__(self, tag, attrib={}): ET.Element.__init__(self, tag, attrib) e = XElement('test') e.text = 'failure' print(ET.tostring(e)) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14849 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14849] C implementation of ElementTree: Inheriting from Element breaks text member
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 41a9d24d075e by Eli Bendersky in branch 'default': Issue #14849: setup Element data members to be assignable in subclasses http://hg.python.org/cpython/rev/41a9d24d075e -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14849 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14849] C implementation of ElementTree: Inheriting from Element breaks text member
Changes by Eli Bendersky eli...@gmail.com: -- assignee: - eli.bendersky resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14849 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14849] C implementation of ElementTree: Inheriting from Element breaks text member
New submission from Markus com...@gmx.ch: Example Code to reproduce: from xml.etree import ElementTree as etree class xetree: cElement = etree.Element class Element(etree.Element): def __init__(self, tag, attrib=None): xetree.cElement.__init__(self, tag, attrib) etree.Element = xetree.Element e = etree.Element(test, {'foobar':'bar'}) e.text = failure print(etree.tostring(e)) # will lack failure So basic inheritance is broken. -- components: Library (Lib) messages: 161043 nosy: cmn priority: normal severity: normal status: open title: C implementation of ElementTree: Inheriting from Element breaks text member versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14849 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14849] C implementation of ElementTree: Inheriting from Element breaks text member
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +eli.bendersky, ezio.melotti priority: normal - release blocker stage: - needs patch type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14849 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14849] C implementation of ElementTree: Inheriting from Element breaks text member
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14849 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com