Issue #1204 resolved

Syntax errors reported during installation of CherryPy 3.2.3 on Python 3.x

Harry Pehkonen
created an issue


C:\TEMP\CherryPy-3.2.3>which python

C:\TEMP\CherryPy-3.2.3>python install
running install
running bdist_egg
byte-compiling build\bdist.win32\egg\cherrypy\ to _cpcompat_subprocess.cpython-33.pyc
  File "build\bdist.win32\egg\cherrypy\", line 484
    except (OSError, IOError), e:
SyntaxError: invalid syntax
Extracting CherryPy-3.2.3-py3.3.egg to c:\python33\lib\site-packages
  File "c:\python33\lib\site-packages\CherryPy-3.2.3-py3.3.egg\cherrypy\", line 484
    except (OSError, IOError), e:
SyntaxError: invalid syntax

Comments (5)

  1. Nabil BEN YOUSSEF

    Same errors for me too.

    In the documentation of :

    This module should remain compatible with Python 2.2, see PEP 291.

    This is why this file cannot be compiled with Python3...

    Harry Pehkonen don't worry : this module is not imported when you will execute after CherryPy with Python3 : At the end of the file :

    # Use subprocess module from Python 2.7 on Python 2.3-2.6
    if sys.version_info < (2,7):
        import cherrypy._cpcompat_subprocess as subprocess
        import subprocess
  2. Nabil BEN YOUSSEF

    The installation doesn't really fail (as you have written in the title of this issue).

    There are just these two errors, that don't block the installation in your <python_path>\Lib\site-packages\cherrypy


  3. Log in to comment