ParseError on installation, Python 3.3
(original reporter: Julian_O) When installing in Python 3.3, the setup script gives a ParseError. It is not clear if this is actually interfering with any functionality, but it is a concerning flag, and is one of the first experiences users have with the software.
The errors in question are:
Can't parse docstring in build\lib\sqlalchemy\ext\hybrid.py line 247: ParseError: bad token: type=55, value='\\', context=('', (247, 42))
Can't parse docstring in build\lib\sqlalchemy\ext\hybrid.py line 448: ParseError: bad token: type=55, value='\\', context=('', (450, 41))
Can't parse docstring in build\lib\sqlalchemy\sql\expression.py line 5607: ParseError: bad token: type=55, value='\\', context=('', (5607, 38))
I am not very familiar with the tool, but I think these might be output from 2to3.
It works fine on Python 2.7.5, 32-bit, Windows. It gives the errors on Python 3.3, 64-bit, Windows.
Here is the full output:
>pip install sqlalchemy
Downloading/unpacking sqlalchemy
Downloading SQLAlchemy-0.8.3.tar.gz (3.9MB): 3.9MB downloaded
Running setup.py egg_info for package sqlalchemy
warning: no files found matching '*.jpg' under directory 'doc'
no previously-included directories found matching 'doc\build\output'
***************************************************************************
WARNING: C extensions are not supported on this Python platform, speedups are not enabled.
Plain-Python build succeeded.
***************************************************************************
Installing collected packages: sqlalchemy
Running setup.py install for sqlalchemy
Fixing build\lib\sqlalchemy\event.py build\lib\sqlalchemy\events.py build\lib\sqlalchemy\exc.py build\lib\sqlalchemy\inspection.py build\lib\sqlalchemy\interfaces.py build\lib\sqlal
\sqlalchemy\dialects\drizzle\__init__.py build\lib\sqlalchemy\dialects\firebird\base.py build\lib\sqlalchemy\dialects\firebird\fdb.py build\lib\sqlalchemy\dialects\firebird\kinterbasdb.
ts\mysql\base.py build\lib\sqlalchemy\dialects\mysql\cymysql.py build\lib\sqlalchemy\dialects\mysql\gaerdbms.py build\lib\sqlalchemy\dialects\mysql\mysqlconnector.py build\lib\sqlalchem
ib\sqlalchemy\dialects\postgresql\pg8000.py build\lib\sqlalchemy\dialects\postgresql\psycopg2.py build\lib\sqlalchemy\dialects\postgresql\pypostgresql.py build\lib\sqlalchemy\dialects\p
uild\lib\sqlalchemy\engine\interfaces.py build\lib\sqlalchemy\engine\reflection.py build\lib\sqlalchemy\engine\result.py build\lib\sqlalchemy\engine\strategies.py build\lib\sqlalchemy\e
e\clsregistry.py build\lib\sqlalchemy\ext\declarative\__init__.py build\lib\sqlalchemy\orm\attributes.py build\lib\sqlalchemy\orm\collections.py build\lib\sqlalchemy\orm\dependency.py b
y build\lib\sqlalchemy\orm\session.py build\lib\sqlalchemy\orm\state.py build\lib\sqlalchemy\orm\strategies.py build\lib\sqlalchemy\orm\sync.py build\lib\sqlalchemy\orm\unitofwork.py bu
build\lib\sqlalchemy\testing\mock.py build\lib\sqlalchemy\testing\pickleable.py build\lib\sqlalchemy\testing\profiling.py build\lib\sqlalchemy\testing\requirements.py build\lib\sqlalch
\test_update_delete.py build\lib\sqlalchemy\testing\suite\__init__.py build\lib\sqlalchemy\util\compat.py build\lib\sqlalchemy\util\deprecations.py build\lib\sqlalchemy\util\langhelpers
Skipping implicit fixer: buffer
Skipping implicit fixer: idioms
Skipping implicit fixer: set_literal
Skipping implicit fixer: ws_comma
Fixing build\lib\sqlalchemy\event.py build\lib\sqlalchemy\events.py build\lib\sqlalchemy\exc.py build\lib\sqlalchemy\inspection.py build\lib\sqlalchemy\interfaces.py build\lib\sqlal
\sqlalchemy\dialects\drizzle\__init__.py build\lib\sqlalchemy\dialects\firebird\base.py build\lib\sqlalchemy\dialects\firebird\fdb.py build\lib\sqlalchemy\dialects\firebird\kinterbasdb.
ts\mysql\base.py build\lib\sqlalchemy\dialects\mysql\cymysql.py build\lib\sqlalchemy\dialects\mysql\gaerdbms.py build\lib\sqlalchemy\dialects\mysql\mysqlconnector.py build\lib\sqlalchem
ib\sqlalchemy\dialects\postgresql\pg8000.py build\lib\sqlalchemy\dialects\postgresql\psycopg2.py build\lib\sqlalchemy\dialects\postgresql\pypostgresql.py build\lib\sqlalchemy\dialects\p
uild\lib\sqlalchemy\engine\interfaces.py build\lib\sqlalchemy\engine\reflection.py build\lib\sqlalchemy\engine\result.py build\lib\sqlalchemy\engine\strategies.py build\lib\sqlalchemy\e
e\clsregistry.py build\lib\sqlalchemy\ext\declarative\__init__.py build\lib\sqlalchemy\orm\attributes.py build\lib\sqlalchemy\orm\collections.py build\lib\sqlalchemy\orm\dependency.py b
y build\lib\sqlalchemy\orm\session.py build\lib\sqlalchemy\orm\state.py build\lib\sqlalchemy\orm\strategies.py build\lib\sqlalchemy\orm\sync.py build\lib\sqlalchemy\orm\unitofwork.py bu
build\lib\sqlalchemy\testing\mock.py build\lib\sqlalchemy\testing\pickleable.py build\lib\sqlalchemy\testing\profiling.py build\lib\sqlalchemy\testing\requirements.py build\lib\sqlalch
\test_update_delete.py build\lib\sqlalchemy\testing\suite\__init__.py build\lib\sqlalchemy\util\compat.py build\lib\sqlalchemy\util\deprecations.py build\lib\sqlalchemy\util\langhelpers
Skipping implicit fixer: buffer
Skipping implicit fixer: idioms
Skipping implicit fixer: set_literal
Skipping implicit fixer: ws_comma
Can't parse docstring in build\lib\sqlalchemy\ext\hybrid.py line 247: ParseError: bad token: type=55, value='\\', context=('', (247, 42))
Can't parse docstring in build\lib\sqlalchemy\ext\hybrid.py line 448: ParseError: bad token: type=55, value='\\', context=('', (450, 41))
Can't parse docstring in build\lib\sqlalchemy\sql\expression.py line 5607: ParseError: bad token: type=55, value='\\', context=('', (5607, 38))
warning: no files found matching '*.jpg' under directory 'doc'
no previously-included directories found matching 'doc\build\output'
***************************************************************************
WARNING: C extensions are not supported on this Python platform, speedups are not enabled.
Plain-Python build succeeded.
***************************************************************************
Successfully installed sqlalchemy
Cleaning up...
Comments (5)
-
Account Deleted -
repo owner its the 2to3 process, and it's only a docstring. SQLAlchemy 9 no longer uses 2to3 in any case so this issue is already fixed going forward. I don't think people are generally too concerned about a few error messages in the 2to3 process, as if the error was truly a fatal one then the library would fail to import. that said feel free to send a short pullreq on the 0.8 branch here https://github.com/zzzeek/sqlalchemy/tree/rel_0_8 to expedite resolution of this issue. (will backport to 0.7 where it likely exists also...)
-
Account Deleted (original author: Julian_O) That it is "fixed" (i.e. no longer relevant in 0.9) seems a sufficient solution to me.
I would endorse closing this without no action, leaving the bug-report as an artifact for other people who stumble on the same problem.
-
repo owner - changed status to wontfix
fine by me
-
repo owner - removed milestone
Removing milestone: 0.8.xx (automated comment)
- Log in to comment
(original author: Julian_O) The first two lines in question are of the format:
i.e. they are doctest strings, using the Python 2.x format.
I wonder if 2to3 is being confused by the existence of an old format print statement within a comment.
I suggest replacing it with the new style print function (i.e. parenthesis) to satisfy 2to3.
If that doesn't work, replace print with str.