[lxml-dev] annotate, pyannotate, xsiannotate
Stefan Behnel
stefan_ml at behnel.de
Fri Sep 21 10:22:58 CEST 2007
jholg at gmx.de wrote:
>> Any reason there *is* a pytypename() function? It doesn't seem to be used.
>
> I figured it's nice to have it usable from outside objectify if you need to use explicit pytype names, so you don't have to reimplement the str/unicode distinction everywhere.
Ok, why not. I added it.
>>> Btw I'm getting core dumps in the schematron tests:
>>>
>>> 685/802 ( 85.4%): test_schematron_invalid_schema_empty
>> (...hematron.ETreeSchematronTestCase)Segmentation Fault (core dumped)
>>> #0 0xff0b3218 in strlen () from /usr/lib/libc.so.1
>>> #1 0xff106530 in _doprnt () from /usr/lib/libc.so.1
>>> #2 0xff108730 in vsnprintf () from /usr/lib/libc.so.1
>>> #3 0xfe2b7874 in __xmlRaiseError () from /apps/prod/lib/libxml2.so.2
>>> #4 0xfe45fd5c in xmlSchematronPErr () from /apps/prod/lib/libxml2.so.2
>>> #5 0xfe462d24 in xmlSchematronParse () from /apps/prod/lib/libxml2.so.2
>>> #6 0xfe60f080 in __pyx_f_5etree_10Schematron___init__
>> (__pyx_v_self=0x829a10,
>>> __pyx_args=0x8872c8, __pyx_kwds=0x109b04) at src/lxml/etree.c:4131
>>> #7 0x58504 in type_call (type=0xfe665988, args=0x829d30, kwds=0x89d4b0)
>>> at Objects/typeobject.c:443
>>> #8 0x260c4 in PyObject_Call (func=0x829a10, arg=0x829d30, kw=0x89d4b0)
>>> at Objects/abstract.c:1802
>> I don't get those, with none of the supported libxml2 versions. What's the
>> one
>> you use? Have you seen those with the trunk before or is it just now?
>
> No, I've not seen such problems on the trunk before. I had to upgrade to latest cython to build this time.
>
> This is the setup:
>
> TESTED VERSION: 2.0.alpha2-46719
> Python: (2, 4, 4, 'final', 0)
> lxml.etree: (2, 0, -198, 46719)
> libxml used: (2, 6, 27)
> libxml compiled: (2, 6, 27)
> libxslt used: (1, 1, 20)
> libxslt compiled: (1, 1, 20)
Schematron uses XPath a lot, so I wouldn't be surprised if this was related to
the XPath bug in libxml2 2.6.27. Is there any chance you could switch to
2.6.28 or later? Note that lxml.etree (trunk) now emits a warning if you use
XPath on 2.6.27, as we can't really work around it. It happens when you get
certain errors in the XPath evaluation, as in the case above.
Stefan
More information about the lxml-dev
mailing list