[lxml-dev] Strange segmentation fault if class inherited from objectify.ObjectifiedElement

I just tried this and got an segmentation fault :-( Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from lxml import objectify from lxml import etree
print etree.LXML_VERSION, etree.LIBXML_VERSION (2, 2, 2, 0) (2, 6, 32)
class test (objectify.ObjectifiedElement) : ... pass ... good = objectify.Element ("abc") print type (good), repr (good) <type 'lxml.objectify.ObjectifiedElement'> <Element abc at 7f0797587fc8>
bad = test ("abc") Segmentation fault
I read that you have to instantiate a parser with objectify.makeparser and use the method makeelement from there. However I would expect that at least not Segmentation Fault happens, if someone is using the normal inheritance as used to be. regards Daniel

Daniel Albeseder wrote:
I just tried this and got an segmentation fault :-(
Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from lxml import objectify from lxml import etree
print etree.LXML_VERSION, etree.LIBXML_VERSION (2, 2, 2, 0) (2, 6, 32) class test (objectify.ObjectifiedElement) : ... pass ... good = objectify.Element ("abc") print type (good), repr (good) <type 'lxml.objectify.ObjectifiedElement'> <Element abc at 7f0797587fc8> bad = test ("abc") Segmentation fault
participants (2)
-
Daniel Albeseder
-
Stefan Behnel