Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/1st1'closed_at=<Date2017-03-03.23:10:38.759>created_at=<Date2016-12-07.04:41:33.466>labels= ['interpreter-core', 'type-bug', '3.7']
title='Make sure exceptions raised in __aiter__ are properly chained in ceval'updated_at=<Date2017-03-31.16:36:30.278>user='https://github.com/1st1'
Ned, please take a look at the attached patch. While I think that the change is quite small & safe to merge, I think it's OK if we push this only in 3.6.1. It's a nice usability improvement, but only for people that implement objects with custom __await__, which is quite a rare case.
Serhiy, we don't have _PyErr_FormatFromCause in 3.5, so I'll probably commit the patch as is in 3.5. For 3.6 is definitely makes sense to use _PyErr_FormatFromCause.
Activity
1st1 commented on Dec 7, 2016
Originally reported in http://bugs.python.org/issue28885#msg282538
Ned, please take a look at the attached patch. While I think that the change is quite small & safe to merge, I think it's OK if we push this only in 3.6.1. It's a nice usability improvement, but only for people that implement objects with custom __await__, which is quite a rare case.
serhiy-storchaka commented on Dec 7, 2016
Should the original exception be stored on the __context__ or the __cause__ attribute? In the latter case you should use _PyErr_FormatFromCause().
ned-deily commented on Dec 7, 2016
Yury, sounds like a bug to me so it would be appropriate for a maintenance release. And not a showstopper release critical.
1st1 commented on Dec 7, 2016
Ned, sounds good.
Serhiy, we don't have _PyErr_FormatFromCause in 3.5, so I'll probably commit the patch as is in 3.5. For 3.6 is definitely makes sense to use _PyErr_FormatFromCause.
1st1 commented on Mar 3, 2017
New changeset dea5101 by Yury Selivanov in branch '3.6':
bpo-28893: Set __cause__ for errors in async iteration protocol (#407)
dea5101
1st1 commented on Mar 24, 2017
New changeset 398ff91 by Yury Selivanov in branch 'master':
bpo-28893: Set __cause__ for errors in async iteration protocol (#407)
398ff91