[issue4716] Python 3.0 halts on shutdown when settrace is set

2008-12-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the investigation! The problem has already been reported in #3618. Closing this one. -- resolution: -> duplicate status: open -> closed superseder: -> possible deadlock in IO library (Lib/io.py) ___ Pyth

[issue4716] Python 3.0 halts on shutdown when settrace is set

2008-12-26 Thread Gabriel Genellina
Gabriel Genellina added the comment: Yes, this is exactly the problem. The execution never goes beyond print ('here'); if you print frame.f_lineno you'll see it blocks at io.py line 1036, waiting for a Lock for the second time. So the trace function cannot use print, not write to regular files

[issue4716] Python 3.0 halts on shutdown when settrace is set

2008-12-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: I haven't investigated, but in py3k print() has currently bits written in Python, which means it will get (recursively) traced when called from the trace function. It can of course have all kinds of funny implications! -- nosy: +pitrou

[issue4716] Python 3.0 halts on shutdown when settrace is set

2008-12-22 Thread Fabio Zadrozny
New submission from Fabio Zadrozny : In Python 3.0, the interpreter will not shutdown properly after setting a tracing function and something goes into stdout. The code attached shows the problem in action: just execute it and notice how the interpreter will be kept running after the code has be