Catching python syntax errors at build time

Panu Matilainen pmatilai at laiskiainen.org
Fri Feb 20 18:13:30 UTC 2009


On Fri, 20 Feb 2009, Bill Nottingham wrote:

> Tim Waugh (twaugh at redhat.com) said:
>> It occurred to me that, since we are already byte-compiling Python code
>> at build time, it is no extra effort to verify that it can be parsed and
>> fail if not.
>>
>> See attached patch.
>>
>> Can anyone think of any reason not to do this?
>
> Only if it causes false positives; otherwise, I certainly
> don't see a reason to not do it.

Any file named *.py gets processed by it so sure there's room for false 
positives with things like text document named README.py but if that's of 
any real concern... Probably the best way to find out is to stick it in 
and see who yells first :)

I certainly like the idea.

 	- Panu -




More information about the fedora-devel-list mailing list