X Tutup
The Wayback Machine - https://web.archive.org/web/20250827143353/https://github.com/python/cpython/issues/73053
Skip to content

NamedTemporaryFile does not generate a ResourceWarning for unclosed files (unlike TemporaryFile) #73053

@jdufresne

Description

@jdufresne
mannequin
BPO 28867
Nosy @vstinner, @bitdancer, @jdufresne
PRs
  • bpo-28867: Warn when NamedTemporaryFile is not explicitly closed #1936
  • Files
  • namedtemporaryfile-resourcewarning.patch: Patch to add ResourceWarning to NamedTemporaryFile
  • namedtemporaryfile-resourcewarning-2.patch: Updated patch
  • namedtemporaryfile-resourcewarning-3.patch: Patch take 3
  • namedtemporaryfile-resourcewarning-4.patch: Patch take 4
  • 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 2016-12-04.17:47:27.371>
    labels = ['3.7', 'type-bug', 'library']
    title = 'NamedTemporaryFile does not generate a ResourceWarning for unclosed files (unlike TemporaryFile)'
    updated_at = <Date 2017-06-04.03:13:36.750>
    user = 'https://github.com/jdufresne'

    bugs.python.org fields:

    activity = <Date 2017-06-04.03:13:36.750>
    actor = 'jdufresne'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2016-12-04.17:47:27.371>
    creator = 'jdufresne'
    dependencies = []
    files = ['45783', '45789', '45851', '45852']
    hgrepos = []
    issue_num = 28867
    keywords = ['patch']
    message_count = 11.0
    messages = ['282352', '282355', '282360', '282366', '282372', '282599', '282629', '282630', '282631', '282933', '282955']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'r.david.murray', 'SilentGhost', 'jdufresne']
    pr_nums = ['1936']
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue28867'
    versions = ['Python 3.6', 'Python 3.7']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of lifestdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

      Projects

      Status

      No status

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        X Tutup