This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients pitrou, python-dev, serhiy.storchaka, vstinner
Date 2015-01-31.10:15:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1422699340.71.0.596907291084.issue23353@psf.upfronthosting.co.za>
In-reply-to
Content
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".
History
Date User Action Args
2015-01-31 10:15:40vstinnersetrecipients: + vstinner, pitrou, python-dev, serhiy.storchaka
2015-01-31 10:15:40vstinnersetmessageid: <1422699340.71.0.596907291084.issue23353@psf.upfronthosting.co.za>
2015-01-31 10:15:40vstinnerlinkissue23353 messages
2015-01-31 10:15:40vstinnercreate