Skip to content

codecs.open leaks file descriptor when invalid encoding is passed #83152

Description

@BrockMendel
BPO 38971
Nosy @serhiy-storchaka, @MojoVampire, @miss-islington, @tirkarthi, @caporta
PRs
  • bpo-38971: open file in codecs.open() closes if exception raised #17666
  • [3.7] bpo-38971: Open file in codecs.open() closes if exception raised. (GH-17666) #18733
  • [3.8] bpo-38971: Open file in codecs.open() closes if exception raised. (GH-17666) #18734
  • 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 2020-03-02.08:16:43.886>
    created_at = <Date 2019-12-04.16:51:47.592>
    labels = ['easy', '3.8', '3.9', 'expert-IO', 'performance', '3.7', 'library']
    title = 'codecs.open leaks file descriptor when invalid encoding is passed'
    updated_at = <Date 2020-03-02.08:16:43.885>
    user = 'https://bugs.python.org/BrockMendel'

    bugs.python.org fields:

    activity = <Date 2020-03-02.08:16:43.885>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-03-02.08:16:43.886>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)', 'IO']
    creation = <Date 2019-12-04.16:51:47.592>
    creator = 'Brock Mendel'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38971
    keywords = ['patch', 'easy']
    message_count = 12.0
    messages = ['357811', '357812', '357814', '357815', '357818', '357834', '357838', '360731', '363128', '363136', '363137', '363138']
    nosy_count = 6.0
    nosy_names = ['serhiy.storchaka', 'josh.r', 'miss-islington', 'xtreak', 'Brock Mendel', 'caporta']
    pr_nums = ['17666', '18733', '18734']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue38971'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of life3.8 (EOL)end of life3.9 (EOL)end of lifeeasyperformancePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directorytopic-IO

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions