Description of problem: PyXML throws a "SyntaxError: invalid syntax" error: File "/usr/lib64/python2.6/site-packages/_xmlplus/xpath/__init__.py", line 112, in <module> from pyxpath import ExprParserFactory File "/usr/lib64/python2.6/site-packages/_xmlplus/xpath/pyxpath.py", line 59, in <module> from xml.xpath.ParsedAbbreviatedRelativeLocationPath import ParsedAbbreviatedRelativeLocationPath File "/usr/lib64/python2.6/site-packages/_xmlplus/xpath/ParsedAbbreviatedRelativeLocationPath.py", line 31 as = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self') ^ SyntaxError: invalid syntax Version-Release number of selected component (if applicable): PyXML-0.8.4-11.x86_64 python-2.6-2.fc11.x86_64 How reproducible: Always reproducible Steps to Reproduce: 1. Run python 2. from xml import xpath Actual results: # python Python 2.6 (r26:66714, Dec 10 2008, 15:22:18) [GCC 4.3.2 20081105 (Red Hat 4.3.2-7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from xml import xpath Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.6/site-packages/_xmlplus/xpath/__init__.py", line 112, in <module> from pyxpath import ExprParserFactory File "/usr/lib64/python2.6/site-packages/_xmlplus/xpath/pyxpath.py", line 59, in <module> from xml.xpath.ParsedAbbreviatedRelativeLocationPath import ParsedAbbreviatedRelativeLocationPath File "/usr/lib64/python2.6/site-packages/_xmlplus/xpath/ParsedAbbreviatedRelativeLocationPath.py", line 31 as = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self') ^ SyntaxError: invalid syntax Expected results: This should import without an error. Additional info: This doesn't seem to be a problem using: PyXML-0.8.4-10.x86_64 and python-2.5.1-30.fc10.x86_64
'as' is a reserved keyword in Python 2.6 Issue affects both ParsedAbbreviatedRelativeLocationPath.py and ParsedAbbreviatedAbsoluteLocationPath.py. I've just submitted PyXML-0.8.4-12 which should correct this : http://koji.fedoraproject.org/koji/taskinfo?taskID=1020250