python / python/cpython

NamedTemporaryFile can leave temporary files behind

Open
#78,338 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.8 (EOL) stdlib type-bug
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

BPO 34157
Nosy @rhettinger, @ncoghlan, @giampaolo, @jwilk, @bitdancer, @tirkarthi
Superseder
  • bpo-29988: with statements are not ensuring that exit is called if enter succeeds
  • 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 = None
    created_at = <Date 2018-07-19.19:29:31.991>
    labels = ['3.8', 'type-bug', 'library']
    title = 'NamedTemporaryFile can leave temporary files behind'
    updated_at = <Date 2018-07-22.00:32:11.929>
    user = 'https://github.com/jwilk'
    

    bugs.python.org fields:

    activity = <Date 2018-07-22.00:32:11.929>
    actor = 'giampaolo.rodola'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2018-07-19.19:29:31.991>
    creator = 'jwilk'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34157
    keywords = []
    message_count = 6.0
    messages = ['321965', '321974', '321999', '322009', '322013', '322027']
    nosy_count = 6.0
    nosy_names = ['rhettinger', 'ncoghlan', 'giampaolo.rodola', 'jwilk', 'r.david.murray', 'xtreak']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = '29988'
    type = 'behavior'
    url = 'https://bugs.python.org/issue34157'
    versions = ['Python 3.8']
    

    Contributor guide

    Open the contributing guide

    First steps

    1. Read the whole issue, then the project's contributing guide.
    2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
    3. Fork the repository and make your change on a branch.
    4. Open a pull request that references the issue number.

    Research direction

    No source file or test is named. Start by reading the superseding bpo-29988 issue, then trace the NamedTemporaryFile behavior and related tests; completion should address the temporary-file cleanup problem described here without duplicating work already moved there.

    Written by the indexing model from the issue text.

    Assessment

    Tech stack
    python
    Domain
    backend
    Issue type
    Bug
    Difficulty
    4/5
    Estimated time
    3-5 days
    Activity status
    Stale
    Clarity
    Needs clarification
    Newbie friendliness
    18/100

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.