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
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Pierre Schmitz (Pierre)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

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.
Comment by Simon Lipp (moonz) - Monday, 25 May 2009, 14:32 GMT
Same problem here ; attached patch & PKGBUILD fixed the issue
Comment by Jakob Gruber (schuay) - Sunday, 04 March 2012, 18:25 GMT
  • Field changed: Percent Complete (100% → 0%)
This occurs again in the latest version, pyxml 0.8.4-9.
Reproduce by running: python2 -c 'from xml import xpath'

Loading...