Skip to content

decoding_fgets() truncates long lines and fails with a SyntaxError("Non-UTF-8 code starting with...") #59016

@vpython

Description

@vpython
mannequin
BPO 14811
Nosy @pitrou, @vstinner, @tjguk, @ezio-melotti, @bitdancer, @briancurtin, @hynek, @serhiy-storchaka, @eryksun, @lysnikolaou, @pablogsal, @isidentical
Superseder
  • bpo-25643: Python tokenizer rewriting
  • Files
  • t33a.py: test case demonstrating bug
  • detect_truncate.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 = None
    closed_at = <Date 2021-04-13.17:07:04.612>
    created_at = <Date 2012-05-15.04:31:40.176>
    labels = ['interpreter-core', 'type-bug', '3.8', '3.9', 'expert-unicode']
    title = 'decoding_fgets() truncates long lines and fails with a SyntaxError("Non-UTF-8 code starting with...")'
    updated_at = <Date 2021-04-13.23:35:33.078>
    user = 'https://bugs.python.org/vpython'

    bugs.python.org fields:

    activity = <Date 2021-04-13.23:35:33.078>
    actor = 'pablogsal'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-04-13.17:07:04.612>
    closer = 'vstinner'
    components = ['Interpreter Core', 'Unicode']
    creation = <Date 2012-05-15.04:31:40.176>
    creator = 'v+python'
    dependencies = []
    files = ['25593', '25605']
    hgrepos = []
    issue_num = 14811
    keywords = ['patch']
    message_count = 20.0
    messages = ['160679', '160686', '160688', '160697', '160701', '160705', '160706', '160708', '160709', '160767', '160772', '160807', '165841', '167154', '390969', '390974', '390975', '390978', '391015', '391017']
    nosy_count = 13.0
    nosy_names = ['pitrou', 'vstinner', 'tim.golden', 'ezio.melotti', 'v+python', 'r.david.murray', 'brian.curtin', 'hynek', 'serhiy.storchaka', 'eryksun', 'lys.nikolaou', 'pablogsal', 'BTaskaya']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '25643'
    type = 'behavior'
    url = 'https://bugs.python.org/issue14811'
    versions = ['Python 3.8', 'Python 3.9']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions