Bug 477783 - PyXML is not compatible with python2.6
PyXML is not compatible with python2.6
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: PyXML (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Roman Rakus
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-23 12:53 EST by Kaitlin Rupert
Modified: 2014-01-12 19:08 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-24 01:09:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kaitlin Rupert 2008-12-23 12:53:05 EST
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
Comment 1 Johan Cwiklinski 2008-12-24 01:09:36 EST
'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

Note You need to log in before you can comment on or make changes to this bug.