[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Catching python syntax errors at build time



On Fri, 20 Feb 2009, Jeff Spaleta wrote:

On Fri, Feb 20, 2009 at 9:38 AM, Jeremy Katz <katzj redhat com> wrote:
Yeah, I'm for putting it in.  While it may cause a couple more
speed-bumps for the rebuild next week, it'll raise our quality in the
long run and therefore seems like the "right" thing to do

Should we prepare for some sort of organized group effort to help
maintainers who get poked in the eye with failures caused by this?
Worst case, this impacts a lot of smaller python packages and it would
be nice if we could stand up a crack team of python experts to help
sort out the fallout for maintainers who get caught unprepared.

I seriously doubt this is going to affect too many python packages, the bytecompile just catches direct syntax errors, nothing more (and nothing less):

improt yum	# will be caught, syntax error
import uym	# wont be noticed, run-time binding
myfunction(	# will be caught, syntax error
myfucntion()	# wont be noticed, run-time binding

If somebody feels like scripting a bit, it should be possible to fairly accurately determine affected packages: if a package has *.py files but not the corresponding *.pyc and *.pyo files for each of them, the byte-compile has failed and with the new check, building the package will fail.

	- Panu -


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]