[issue2221] Py30a3: eval in threaded code raises SystemError

2008-04-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I think this is good enough: you should not invoke python code with a pending exception set (PyErr_Occurred()). __ Tracker <[EMAIL PROTECTED]> __

[issue2221] Py30a3: eval in threaded code raises SystemError

2008-04-09 Thread Kurt B. Kaiser
Kurt B. Kaiser <[EMAIL PROTECTED]> added the comment: PyObject_CallMethod is actually returning a non-NULL result for sys.std{out,err}, and PyErr_Clear() isn't being run in flush_io. The problem is deeper. PyErr is being used during unexceptional processing in typeobject.c:slot_tp_getattr_hook

[issue2221] Py30a3: eval in threaded code raises SystemError

2008-04-04 Thread Kurt B. Kaiser
Kurt B. Kaiser <[EMAIL PROTECTED]> added the comment: Thanks, that does appear to fix the IDLE problem! The pseudofile does have a flush method and I was able to call it from the IDLE subprocess; it returns None. So I'm not clear on why PyObject_CallMethod was returning False, or why the probl

[issue2221] Py30a3: eval in threaded code raises SystemError

2008-04-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Committed r62157. Will also investigate why exec() needs to flush sys.stdout... -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]>

[issue2221] Py30a3: eval in threaded code raises SystemError

2008-04-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The problem is just that in Python/pythonrun.c, the function run_mod() calls flush_io() after executing the code. In our testcase, there is a pending exception. But flush_io() silently ignore errors (which is fine), and clears all except

[issue2221] Py30a3: eval in threaded code raises SystemError

2008-04-04 Thread Kurt B. Kaiser
Kurt B. Kaiser <[EMAIL PROTECTED]> added the comment: I don't think that this is an IDLE error. It can be more generally exhibited as follows: Without the subprocess we get the expected: IDLE 3.0a4 No Subprocess >>> eval('a') Traceback (most recent call last): File "", line 1