[lxml-dev] OpenVMS port of lxml

Stefan Behnel stefan_ml at behnel.de
Sun Jul 15 21:47:45 CEST 2007



Jean-François Piéronne wrote:
> Stefan Behnel wrote:
>> Jean-François Piéronne wrote:
>>> lxml 1.3.2 has been successfully ported to OpenVMS (Alpha and Itanium
>>> platform).
> I have attach the generated warning for one of the source file.
> Others source files produce the same king of warning.

Thanks. That's actually my 'fault' rather than Pyrex', but those are only
irrelevant warnings about generated generic code, nothing that could break
anything. It looks like the C compiler on VMS is a bit more picky about some
things.

The warnings should go away with an explicit cast in the right place of the
generated header file (see attached pyrex-cast.patch)


> ======================================================================
> FAIL: test_module_HTML_unicode
> (lxml.tests.test_htmlparser.HtmlParserTestCaseBase)
> ----------------------------------------------------------------------

I know that one. Does the VMS port of libxml2 use iconv? Do you know the
native unicode encoding that VMS Python uses? UTF16 or UCS-4? big or little
endian?


> The NAN/NaNQ if probably a VMS

Looks like it. Here's a simple fix for the test case:

=======================
Index: src/lxml/tests/test_xpathevaluator.py
===================================================================
--- src/lxml/tests/test_xpathevaluator.py       (Revision 44997)
+++ src/lxml/tests/test_xpathevaluator.py       (Arbeitskopie)
@@ -23,7 +23,7 @@
                           tree.xpath('number(/a)'))
         tree = self.parse('<a>A</a>')
         actual = str(tree.xpath('number(/a)'))
-        expected = ['nan', '1.#qnan']
+        expected = ['nan', '1.#qnan', 'nanq']
         if not actual.lower() in expected:
             self.fail('Expected a NAN value, got %s' % actual)

=======================


> So on AXP 432 tests are executed and 794 on Itanium.

You probably have ElementTree installed on Itanium (maybe Python 2.5?), but
not on AXP. The test suite also contains comparative compatibility tests
against ElementTree that only run when it is installed.


>>>   * test_xslt.py
>>> Python interpreter crash with an error during the rundown of the program:
>>> assert error: expression = autoInterpreterState, in file
>>> PYTHON_ROOT:[Python]pystate.c;1 at line 563
>>
>> Hmmm, that one looks bad, though. Would you have any more hints on what
>> happens here?
> 
> Full traceback:
> #> python test_xslt.py
> ...............................................
> ----------------------------------------------------------------------
> Ran 47 tests in 0.223s
> 
> OK
> assert error: expression = autoInterpreterState, in file
> PYTHON_ROOT:[Python]pys
> tate.c;1 at line 563
> %SYSTEM-F-OPCCUS, opcode reserved to customer fault at
> PC=FFFFFFFF80AA0DF4, PS=0
> 000001B
> %TRACE-F-TRACEBACK, symbolic stack dump follows
>   image    module    routine             line      rel PC           abs PC
>                                             0 FFFFFFFF80AA0DF4
> FFFFFFFF80AA0DF4
>                                             0 FFFFFFFF80B34A74
> FFFFFFFF80B34A74
>  PYTHONSHR  pystate  PyGILState_Ensure  20250 0000000000001374
> 00000000002C7E04
>  libxml2xsltlxmlmod  etree  __pyx_f_5etree__receiveError
>                                         67362 000000000002F1E4
> 0000000000B1E704
>  libxml2xsltlxmlmod  error  __xmlRaiseError
>                                         16027 0000000000001248
[...]

Hmmm, but your above tests ran through, didn't they? Not sure what happens
here. Could this be a problem with differences in threading on VMS?

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyrex-cast.patch
Type: text/x-diff
Size: 681 bytes
Desc: not available
Url : http://codespeak.net/pipermail/lxml-dev/attachments/20070715/728527b1/attachment.bin 


More information about the lxml-dev mailing list