FS#14782 - [pyxml] syntax error on import _xmlplus.xpath
Attached to Project:
Arch Linux
Opened by Abhishek Dasgupta (abhidg) - Thursday, 21 May 2009, 13:22 GMT
Last edited by Jan de Groot (JGC) - Sunday, 19 August 2012, 17:09 GMT
Opened by Abhishek Dasgupta (abhidg) - Thursday, 21 May 2009, 13:22 GMT
Last edited by Jan de Groot (JGC) - Sunday, 19 August 2012, 17:09 GMT
|
Details
Description:
With python 2.6, trying to "import _xmlplus.xpath" gives the following error: >>> import _xmlplus.xpath Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.6/site-packages/_xmlplus/xpath/__init__.py", line 57, in <module> import MessageSource File "/usr/lib/python2.6/site-packages/_xmlplus/xpath/MessageSource.py", line 1, in <module> from xml.xpath import RuntimeException, CompiletimeException File "/usr/lib/python2.6/site-packages/_xmlplus/xpath/__init__.py", line 112, in <module> from pyxpath import ExprParserFactory File "/usr/lib/python2.6/site-packages/_xmlplus/xpath/pyxpath.py", line 59, in <module> from xml.xpath.ParsedAbbreviatedRelativeLocationPath import ParsedAbbreviatedRelativeLocationPath File "/usr/lib/python2.6/site-packages/_xmlplus/xpath/ParsedAbbreviatedRelativeLocationPath.py", line 31 as = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self') ^ SyntaxError: invalid syntax Additional info: * pyxml 0.8.4-5 The problem can be fixed by replacing the 'as' variable which is reserved in python 2.6 with something else throughout the module. This should be an upstream bug but given that the last released version of pyxml was in 2004, I doubt whether there is any development activity now. This bug also causes packages depending on pyxml like serpentine to fail. |
This task depends upon
Closed by Jan de Groot (JGC)
Sunday, 19 August 2012, 17:09 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in 0.8.4-10.
Sunday, 19 August 2012, 17:09 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in 0.8.4-10.
PKGBUILD (0.7 KiB)
Reproduce by running: python2 -c 'from xml import xpath'