Skip to content

tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable #63079

@jortbloem

Description

@jortbloem
mannequin
BPO 18879
Nosy @birkenfeld, @ncoghlan, @pitrou, @vstinner, @bitdancer, @meadori, @socketpair, @vadmium, @serhiy-storchaka, @jstasiak
Files
  • tempfile.patch
  • tempfile_simplify.patch
  • tempfile_wrap_methods.patch
  • tempfile_lifetime.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/pitrou'
    closed_at = <Date 2013-12-21.21:21:12.772>
    created_at = <Date 2013-08-29.20:25:43.325>
    labels = ['type-bug', 'library', 'expert-IO']
    title = 'tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable'
    updated_at = <Date 2014-05-26.06:27:57.890>
    user = 'https://bugs.python.org/jortbloem'

    bugs.python.org fields:

    activity = <Date 2014-05-26.06:27:57.890>
    actor = 'socketpair'
    assignee = 'pitrou'
    closed = True
    closed_date = <Date 2013-12-21.21:21:12.772>
    closer = 'pitrou'
    components = ['Library (Lib)', 'IO']
    creation = <Date 2013-08-29.20:25:43.325>
    creator = 'jort.bloem'
    dependencies = []
    files = ['31598', '31603', '33153', '33252']
    hgrepos = []
    issue_num = 18879
    keywords = ['patch']
    message_count = 22.0
    messages = ['196485', '196496', '196501', '196504', '196507', '196952', '196985', '196991', '196992', '197016', '197019', '204723', '206257', '206258', '206554', '206776', '206778', '206780', '206781', '206782', '216506', '219138']
    nosy_count = 15.0
    nosy_names = ['georg.brandl', 'ncoghlan', 'ctheune', 'pitrou', 'vstinner', 'Arfrever', 'r.david.murray', 'meador.inge', 'socketpair', 'python-dev', 'martin.panter', 'serhiy.storchaka', 'jort.bloem', 'Zden\xc4\x9bk.Pavlas', 'jstasiak']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue18879'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']

    Metadata

    Metadata

    Assignees

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-IOtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions