Skip to content

with statements are not ensuring that __exit__ is called if __enter__ succeeds #74174

@njsmith

Description

@njsmith
BPO 29988
Nosy @rhettinger, @gpshead, @ncoghlan, @nirs, @njsmith, @markshannon, @embray, @serhiy-storchaka, @jdemeyer, @1st1, @ryanhiebert, @xgid, @jack1142
PRs
  • Protect C-implemented context managers, like lock, from ctrl-C. Fixes bpo-29988. #1799
  • bpo-29988: Only check evalbreaker after calls and on backwards egdes.  #18334
  • Dependencies
  • bpo-31344: f_trace_opcodes frame attribute to switch to per-opcode tracing
  • 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 = None
    closed_at = <Date 2021-12-10.17:37:50.631>
    created_at = <Date 2017-04-04.23:42:57.982>
    labels = ['interpreter-core', 'type-bug', '3.9', '3.10']
    title = 'with statements are not ensuring that __exit__ is called if __enter__ succeeds'
    updated_at = <Date 2021-12-10.17:37:50.630>
    user = 'https://github.com/njsmith'

    bugs.python.org fields:

    activity = <Date 2021-12-10.17:37:50.630>
    actor = 'Mark.Shannon'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-12-10.17:37:50.631>
    closer = 'Mark.Shannon'
    components = ['Interpreter Core']
    creation = <Date 2017-04-04.23:42:57.982>
    creator = 'njs'
    dependencies = ['31344']
    files = []
    hgrepos = []
    issue_num = 29988
    keywords = ['patch']
    message_count = 60.0
    messages = ['291148', '291157', '294272', '294296', '294400', '294402', '294404', '294434', '297177', '297179', '297180', '297182', '297185', '297186', '297189', '297190', '301235', '301248', '301274', '301277', '301278', '301285', '301289', '301360', '301429', '301553', '301557', '301566', '301573', '301601', '301609', '301610', '301611', '301620', '301630', '301660', '301667', '301668', '301672', '301675', '301682', '301698', '301717', '301721', '301771', '301869', '312874', '321225', '321318', '350123', '350134', '352026', '352039', '352199', '352212', '352457', '353415', '372499', '386711', '389922']
    nosy_count = 15.0
    nosy_names = ['rhettinger', 'gregory.p.smith', 'ncoghlan', 'nirs', 'njs', 'Mark.Shannon', 'erik.bray', 'serhiy.storchaka', 'jdemeyer', 'yselivanov', 'deleted0524', 'ryanhiebert', 'xgdomingo', 'jack1142', 'Ami Fischman']
    pr_nums = ['1799', '18334']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue29988'
    versions = ['Python 3.9', 'Python 3.10']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10only security fixes3.9 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions