#32 1.5.2 won't easy_install under Python 2.4

v1.0 (example)
closed
nobody
None
5
2016-09-10
2009-05-13
No

Here's what I'm getting with a fresh install of python2.4 and python2.4-dev on Ubuntu Jaunty. Looks like it's dying on some new exception syntax.

catherine@cordelia:~/dev/setuptools-0.6c9$ sudo easy_install-2.4 pyparsing
Searching for pyparsing
Reading http://pypi.python.org/simple/pyparsing/
Reading http://pyparsing.wikispaces.com/
Download error: (-2, 'Name or service not known') -- Some packages may not be found!
Reading http://sourceforge.net/project/showfiles.php?group_id=97203
Reading http://pyparsing.wikispaces.com/
Download error: (-2, 'Name or service not known') -- Some packages may not be found!
Reading http://pyparsing.wikispaces.com/
Download error: (-2, 'Name or service not known') -- Some packages may not be found!
Reading http://pyparsing.wikispaces.com/
Download error: (-2, 'Name or service not known') -- Some packages may not be found!
Reading http://pyparsing.sourceforge.net/
Reading http://sourceforge.net/projects/pyparsing/
Reading http://pyparsing.wikispaces.com/
Download error: (-2, 'Name or service not known') -- Some packages may not be found!
Reading http://sourceforge.net/projects/pyparsing
Reading http://pyparsing.wikispaces.com/
Download error: (-2, 'Name or service not known') -- Some packages may not be found!
Reading http://pyparsing.wikispaces.com/
Download error: (-2, 'Name or service not known') -- Some packages may not be found!
Best match: pyparsing 1.5.2
Downloading http://pypi.python.org/packages/source/p/pyparsing/pyparsing-1.5.2.tar.gz#md5=13aed3cb21a427f8aeb0fe7ca472ba42
Processing pyparsing-1.5.2.tar.gz
Running pyparsing-1.5.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-VhqKC7/pyparsing-1.5.2/egg-dist-tmp-DQrmlw
File "build/bdist.linux-i686/egg/pyparsing_py3.py", line 2470
except ParseException as err:
^
SyntaxError: invalid syntax
zip_safe flag not set; analyzing archive contents...
pyparsing: module MAY be using inspect.stack
pyparsing: top-level module may be 'python -m' script
File "/usr/lib/python2.4/site-packages/pyparsing-1.5.2-py2.4.egg/pyparsing_py3.py", line 2470
except ParseException as err:
^
SyntaxError: invalid syntax
Adding pyparsing 1.5.2 to easy-install.pth file

Installed /usr/lib/python2.4/site-packages/pyparsing-1.5.2-py2.4.egg
Processing dependencies for pyparsing
Finished processing dependencies for pyparsing

Discussion

  • Nobody/Anonymous

    the except syntax is a fairly simple change:

    except ParseException as err:

    only works on Python 2.6 and up.

    except ParseException, err:

    works everywhere. But is a less obvious syntax if you're just reading.

     
  • Harald Oehlmann

    Harald Oehlmann - 2009-09-04

    I suppose this is in the file pyparsing_py3.py which is only for python 3.
    I have removed this file and its reference in install.py to install with 2.5.

     
  • Paul McGuire

    Paul McGuire - 2009-09-08

    Catherine -

    Thanks for reporting this, this is a known bug. I have a fix in the works, courtesy of Alex Martelli.

    -- Paul

     
  • anatoly techtonik

    The same problem with Python 2.5. Pyparsing is broken on Debian and it's quite a lot of users.

     
  • Paul McGuire

    Paul McGuire - 2016-09-10
    • status: open --> closed
    • Group: --> v1.0 (example)
     
  • Paul McGuire

    Paul McGuire - 2016-09-10

    Cleaning up old bug reports. Recent pyparsing releases are supported on Python versions 2.6 thru 3.5 - older Python installs should install pyparsing 1.5.7. Thanks for the submission!

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks