[Python-projects] Syntax Errors while installing PyLint

Maarten ter Huurne maarten.ter.huurne at philips.com
Mon Oct 15 17:52:28 CEST 2007


> > byte-compiling
> > C:\bn\Python23\Lib\site-packages\pylint\test\input\func_continue_
> > not_in_loop.py to func_continue_not_in_loop.pyc
> >   File
> >
"C:\bn\Python23\Lib\site-packages\pylint\test\input\func_continue_not_in
> > _
> > loop.py", line 8
> >     continue
> > SyntaxError: 'continue' not properly in loop
> >
> > byte-compiling
> > C:\bn\Python23\Lib\site-packages\pylint\test\input\func_genexpr_v
> > ar_scope_py24.py to func_genexpr_var_scope_py24.pyc
> >   File
> >
"C:\bn\Python23\Lib\site-packages\pylint\test\input\func_genexpr_var_sco
> > p
> > e_py24.py", line 5
> >     __revision__ = list(n for n in range(10))
> >                             ^
> > SyntaxError: invalid syntax
>
>
> If you take a closer look at these errors, you will see that the
> problem occurs in the test suite. Some of the code snippets used in
> the test suite are indeed written for python2.4 but it does not affect
> pylint itself.

I don't think the Python version is an issue here. The continue statement
has been there for quite a while: it is present in Python 2.2 and probably
even longer than that. Also, "SyntaxError: 'continue' not properly in loop"
in a file named "func_continue_not_in_loop.py" makes it sound intentional.

> The real problem is that we should test disutils to ignore the
> `tests` directory.

I've seen similar errors on Linux (Ubuntu), it happened when installing
other Python modules after PyLint. There seems to be a post-installation
step that byte-compiles all Python modules. This includes the PyLint tests,
which should have syntax errors in them, because they test whether PyLint
reports those syntax errors correctly.

Bye,
            Maarten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.logilab.org/pipermail/python-projects/attachments/20071015/2d357949/attachment.htm 


More information about the Python-Projects mailing list