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 ncoghlan
Recipients Valentin David, gps, ncoghlan, vstinner, yselivanov
Date 2016-05-25.14:30:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1464186640.63.0.295256446094.issue27122@psf.upfronthosting.co.za>
In-reply-to
Content
The suggested fix looks basically correct to me - the problem is that the new except clause added by that patch is currently missing the "don't re-raise the passed in exception" logic needed to fully abide by the context management protocol, but we missed that on the patch review.

The only tweak I would recommend is putting that check before the check for StopIteration being converted to RuntimeError so it's immediately obvious to the reader that it takes priority over the exc.__cause__ check.

The comment on that clause should also be adjusted to reflect the fixed behaviour.
History
Date User Action Args
2016-05-25 14:30:40ncoghlansetrecipients: + ncoghlan, vstinner, gps, yselivanov, Valentin David
2016-05-25 14:30:40ncoghlansetmessageid: <1464186640.63.0.295256446094.issue27122@psf.upfronthosting.co.za>
2016-05-25 14:30:40ncoghlanlinkissue27122 messages
2016-05-25 14:30:40ncoghlancreate