Skip to content

contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ #49501

@jwp

Description

@jwp
mannequin
BPO 5251
Nosy @ncoghlan
Superseder
  • bpo-13585: Add contextlib.ExitStack
  • Files
  • nested_issue.py: shows the variations of nested context managers and their results
  • pep377_v2.diff: Second draft
  • pep377_v3.diff: Functionally complete (except compiler package)
  • pep377_bench.py: Micro benchmark for with statement speed
  • outer_sees_no_exc.py
  • 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/ncoghlan'
    closed_at = <Date 2012-05-07.11:40:43.194>
    created_at = <Date 2009-02-13.18:09:29.692>
    labels = ['interpreter-core', 'type-bug']
    title = 'contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__'
    updated_at = <Date 2012-05-07.11:40:43.192>
    user = 'https://bugs.python.org/jwp'

    bugs.python.org fields:

    activity = <Date 2012-05-07.11:40:43.192>
    actor = 'ncoghlan'
    assignee = 'ncoghlan'
    closed = True
    closed_date = <Date 2012-05-07.11:40:43.194>
    closer = 'ncoghlan'
    components = ['Interpreter Core']
    creation = <Date 2009-02-13.18:09:29.692>
    creator = 'jwp'
    dependencies = []
    files = ['13075', '13336', '13337', '13338', '13346']
    hgrepos = []
    issue_num = 5251
    keywords = ['patch']
    message_count = 20.0
    messages = ['81957', '82701', '82886', '83297', '83304', '83588', '83615', '83616', '83617', '83621', '83623', '83626', '83627', '83628', '83658', '83924', '95324', '119516', '120497', '160139']
    nosy_count = 2.0
    nosy_names = ['ncoghlan', 'jwp']
    pr_nums = []
    priority = 'low'
    resolution = 'out of date'
    stage = None
    status = 'closed'
    superseder = '13585'
    type = 'behavior'
    url = 'https://bugs.python.org/issue5251'
    versions = ['Python 3.3']

    Metadata

    Metadata

    Assignees

    Labels

    interpreter-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