Skip to content

fileinput.FileInput.readline() always returns str object at the end even if in 'rb' mode #69696

@RyosukeIto

Description

@RyosukeIto
BPO 25510
Nosy @bitdancer, @serhiy-storchaka
Files
  • fileinput.py.diff: A patch for fileinput.py to fix this issue
  • test_fileinput.py.diff: A patch for test_fileinput.py (parent: https://hg.python.org/cpython/rev/f7db966c9fee)
  • 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/serhiy-storchaka'
    closed_at = <Date 2015-11-01.14:50:32.362>
    created_at = <Date 2015-10-29.14:12:19.720>
    labels = ['type-bug', 'library']
    title = "fileinput.FileInput.readline() always returns str object at the end even if in 'rb' mode"
    updated_at = <Date 2015-11-01.21:02:14.130>
    user = 'https://bugs.python.org/RyosukeIto'

    bugs.python.org fields:

    activity = <Date 2015-11-01.21:02:14.130>
    actor = 'r.david.murray'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2015-11-01.14:50:32.362>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2015-10-29.14:12:19.720>
    creator = 'Ryosuke Ito'
    dependencies = []
    files = ['40895', '40918']
    hgrepos = []
    issue_num = 25510
    keywords = ['patch']
    message_count = 8.0
    messages = ['253675', '253679', '253680', '253844', '253848', '253849', '253850', '253875']
    nosy_count = 4.0
    nosy_names = ['r.david.murray', 'python-dev', 'serhiy.storchaka', 'Ryosuke Ito']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue25510'
    versions = ['Python 3.4', 'Python 3.5', 'Python 3.6']

    Metadata

    Metadata

    Labels

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions