Stefan Behnel wrote:
> Dag Sverre Seljebotn wrote:
>> The solution may be to change the way Cython/Runtime/refnanny.pyx
>> reports errors, for instance change Context.delref to do a
>> print/sys.exit(1) thing instead of raising an exception
> 
> I would prefer a simple sys.__stderr__.write() with some helpful
> information in a dedicated code line that you could point gdb to. Killing
> the process sounds everything but helpful. Note that sys.exit() also just
> raises an exception, as opposed to os._exit().

I was referring to doing this for lxml and Sage testing only -- in which 
case you get to do whatever you like :-) So just go ahead and don't use 
sys.exit(), it was just an example, so that you could figure out what is 
going on, I didn't mean to change it like this permanently.

I would like to continue with the current behaviour for the Cython test 
suite, in order to get the nice test failures (though if you think it is 
a problem, one could have runtests.py inspect global variable in the 
refnanny module instead).

One could always have refnanny.pyx check sys.environ for some variable 
to see whether it should print to stderr or raise an exception? Or it 
could be controlled by a global variable in refnanny which runtests.py 
could change...


-- 
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to