Nathaniel Smith added the comment:

> a special case for WITH_CLEANUP_START

I guess this works for the sync case, but it seems kinda fragile, and obviously 
won't work for the async case. Do you think it's worth revisiting this idea 
from the OP?: "The eval loop's "check for signal handlers" code is run rarely, 
so we could afford to do relatively expensive things like check a lookaside 
table that says "no signal handlers when 13 < f_lasti <= 22"."

(Of course it should be 13 <= f_lasti < 22, apparently I was writing in a 
mirror or something.)

BTW, I looked at your branch, and figured out the problem with your async test. 
Asyncio isn't a problem (YIELD_FROM doesn't yield to the event loop, only an 
actual 'yield' statement does that); the problem was just that your test case's 
__aexit__ is written in Python, so you were exceptions delayed until the 
__aexit__ call, and then they were raised inside __aexit__ and the test 
couldn't detect that properly. I have a patch against 9b8891a7ca5 that makes it 
pass. (It switches the pass condition to "either tracking_cm.enter_without_exit 
is False OR AsyncTrackingCM.__aexit__ is in the exception's traceback".) But of 
course it still has the problem with jumping past DEFER_PENDING_UNTIL. Do you 
want me to post the patch here, or in the other issue?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue29988>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to