codecs.open interprets FS, RS, GS as line ends

Open
#62,491 21 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

Start by reviewing the codecs.open implementation and the linked PR #9711, then compare the provided codecs_splitlines.txt and str_splitlines.txt files with the reported behavior. Check the relevant Unicode and IO tests before changing anything; done means the line-ending behavior is covered by tests and matches the agreed interpretation without regressing codecs.open.

Written by the indexing model from the issue text.

Description

docs stdlib topic-IO topic-unicode
BPO 18291
Nosy @malemburg, @doerwalter, @nascheme, @abalkin, @vstinner, @ezio-melotti, @bitdancer, @serhiy-storchaka, @tirkarthi
PRs
  • python/cpython#9711
  • Files
  • codecs-io-example.py: Compare UTF-8 file reading time between io.open and codecs.open.
  • codecs_splitlines.txt
  • str_splitlines.txt: change str.splitlines to use only \r and \n
  • 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 2013-06-24.13:11:12.690>
    labels = ['3.8', 'type-bug', '3.7', 'expert-unicode', 'expert-IO']
    title = 'codecs.open interprets FS, RS, GS as line ends'
    updated_at = <Date 2018-10-05.12:28:09.232>
    user = 'https://bugs.python.org/wpk'
    

    bugs.python.org fields:

    activity = <Date 2018-10-05.12:28:09.232>
    actor = 'lemburg'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Unicode', 'IO']
    creation = <Date 2013-06-24.13:11:12.690>
    creator = 'wpk'
    dependencies = []
    files = ['30688', '47851', '47852']
    hgrepos = []
    issue_num = 18291
    keywords = []
    message_count = 21.0
    messages = ['191758', '191769', '191778', '191784', '191848', '191849', '191853', '192118', '192123', '192280', '327095', '327096', '327098', '327100', '327101', '327104', '327112', '327125', '327127', '327129', '327134']
    nosy_count = 10.0
    nosy_names = ['lemburg', 'doerwalter', 'nascheme', 'belopolsky', 'vstinner', 'ezio.melotti', 'r.david.murray', 'serhiy.storchaka', 'wpk', 'xtreak']
    pr_nums = ['9711']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue18291'
    versions = ['Python 2.7', 'Python 3.6', 'Python 3.7', 'Python 3.8']
    

    Dominant language
    Python
    Stars
    77.2k
    Forks
    36k
    Avg merge
    1d 9h
    Merged PRs (30d)
    558

    Contributor guide

    Open the contributing guide

    First steps

    1. Read the whole issue, then the project's contributing guide.
    2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
    3. Fork the repository and make your change on a branch.
    4. Open a pull request that references the issue number.

    More from python/cpython

    All issues in python/cpython

    Similar issues

    More Python issues

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.