STINNER Victor added the comment: I agree that it's better to not change the behaviour of generators, backward compatibility matters :-)
I wrote tests using my examples and I combined them with gen_exc_state_restore.patch. I commited the changeset in Python 3.4 and 3.5. Backporting the fix to Python 2.7 looks more complex because the EXCEPT_HANDLE try block type and the POP_EXCEPT instruction are new in Python 3.0: introduced by 212a1fee6bf9 from the issue #3021. What do you think? Is it worth to fix this issue in Python 2.7? I plan to workaround this bug in Tulip to support Python 3.3. I will also workaround it in Trollius to support Python 2.6 and newer. So for me, it's ok to live with this known bug. It's just yet another generator bug. asyncio/trollius already work around a yield-from bug (issue #21209) ;-) > Note the patch also fixes the reference leak in test_asyncio. Yes, as I explained in msg235072, this bug caused strange "memory leaks". ---------- Added file: http://bugs.python.org/file37937/gen_exc_value_py27.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23353> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com