This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients brett.cannon, rhettinger, terry.reedy, yselivanov
Date 2015-09-04.21:58:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441403902.99.0.749796663538.issue24981@psf.upfronthosting.co.za>
In-reply-to
Content
The distutils error is a ValueError, which was printed as such before I added 'Exception' to the except statement.

I did not initially catch SyntaxError separately because some are caught during the compile phase. Revised file corrects 'pass' to 'continue' and continues with parse errors also.

Many test/badsyntax files have compile-time syntax errors.

SyntaxError 'await' outside function (badsyntax_async1.py, line 1)
SyntaxError 'yield' inside async function (badsyntax_async6.py, line 2)
SyntaxError from __future__ imports must occur at the beginning of the file (badsyntax_future10.py, line 3)
SyntaxError future feature rested_snopes is not defined (badsyntax_future3.py, line 3)
SyntaxError not a chance (badsyntax_future9.py, line 3)

Attached is a fully recursive version that only report compile errors for non-'badsyntax' files.  It takes about 2 seconds more. Output:

C:/programs/Python35/Lib\distutils _msvccompiler.py ValueError None disallowed in expression list
1776 (files compiled)

I excluded site-packages after testing on 3.4 because pylint has bad syntax examples giving a page of error messages.
History
Date User Action Args
2015-09-04 21:58:23terry.reedysetrecipients: + terry.reedy, brett.cannon, rhettinger, yselivanov
2015-09-04 21:58:22terry.reedysetmessageid: <1441403902.99.0.749796663538.issue24981@psf.upfronthosting.co.za>
2015-09-04 21:58:22terry.reedylinkissue24981 messages
2015-09-04 21:58:22terry.reedycreate