Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure exceptions raised in __aiter__ are properly chained in ceval #73079

Closed
1st1 opened this issue Dec 7, 2016 · 6 comments
Closed

Make sure exceptions raised in __aiter__ are properly chained in ceval #73079

1st1 opened this issue Dec 7, 2016 · 6 comments
Assignees
Labels
3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@1st1
Copy link
Member

1st1 commented Dec 7, 2016

BPO 28893
Nosy @brettcannon, @vstinner, @ned-deily, @serhiy-storchaka, @1st1
PRs
  • bpo-28893: Set __cause__ for errors in async iteration protocol #407
  • bpo-28893: Set __cause__ for errors in async iteration protocol #414
  • [Do Not Merge] Sample of CPython life with blurb. #703
  • [Do Not Merge] Convert Misc/NEWS so that it is managed by towncrier #552
  • Files
  • chain.patch
  • 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 = <Date 2017-03-03.23:10:38.759>
    created_at = <Date 2016-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 = <Date 2017-03-31.16:36:30.278>
    user = 'https://github.com/1st1'

    bugs.python.org fields:

    activity = <Date 2017-03-31.16:36:30.278>
    actor = 'dstufft'
    assignee = 'yselivanov'
    closed = True
    closed_date = <Date 2017-03-03.23:10:38.759>
    closer = 'yselivanov'
    components = ['Interpreter Core']
    creation = <Date 2016-12-07.04:41:33.466>
    creator = 'yselivanov'
    dependencies = []
    files = ['45782']
    hgrepos = []
    issue_num = 28893
    keywords = ['patch']
    message_count = 6.0
    messages = ['282595', '282597', '282659', '282675', '288853', '290339']
    nosy_count = 5.0
    nosy_names = ['brett.cannon', 'vstinner', 'ned.deily', 'serhiy.storchaka', 'yselivanov']
    pr_nums = ['407', '414', '703', '552']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue28893'
    versions = ['Python 3.5', 'Python 3.6', 'Python 3.7']

    @1st1
    Copy link
    Member Author

    1st1 commented 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.

    @1st1 1st1 added the 3.7 (EOL) end of life label Dec 7, 2016
    @1st1 1st1 self-assigned this Dec 7, 2016
    @1st1 1st1 added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Dec 7, 2016
    @serhiy-storchaka
    Copy link
    Member

    Should the original exception be stored on the __context__ or the __cause__ attribute? In the latter case you should use _PyErr_FormatFromCause().

    @ned-deily
    Copy link
    Member

    Yury, sounds like a bug to me so it would be appropriate for a maintenance release. And not a showstopper release critical.

    @1st1
    Copy link
    Member Author

    1st1 commented 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
    Copy link
    Member Author

    1st1 commented 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 1st1 closed this as completed Mar 3, 2017
    @1st1
    Copy link
    Member Author

    1st1 commented Mar 24, 2017

    New changeset 398ff91 by Yury Selivanov in branch 'master':
    bpo-28893: Set __cause__ for errors in async iteration protocol (#407)
    398ff91

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants