str.title() is overzealous by upcasing combining marks inappropriately

Open
#56,946 21 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reading the linked titletest.python and titletest.py demonstrations and reproduce their str.title() results. Then inspect the relevant string-titlecasing implementation and determine the intended treatment of combining marks. The issue is done when the demonstrated inappropriate upcasing is corrected and the behavior has regression coverage.

Written by the indexing model from the issue text.

Description

3.10 3.9 (EOL) stdlib type-bug
BPO 12737
Nosy @gvanrossum, @loewis, @terryjreedy, @ezio-melotti, @florentx, @iritkatriel
Files
  • titletest.python: demo showing python uses incorrect sense of \w for words in titlecasing
  • titletest.py: slightly improved demo
  • 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 2011-08-11.22:37:33.658>
    labels = ['type-bug', 'library', '3.9', '3.10']
    title = 'str.title() is overzealous by upcasing combining marks\tinappropriately'
    updated_at = <Date 2021-07-24.18:29:50.490>
    user = 'https://bugs.python.org/tchrist'
    

    bugs.python.org fields:

    activity = <Date 2021-07-24.18:29:50.490>
    actor = 'terry.reedy'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2011-08-11.22:37:33.658>
    creator = 'tchrist'
    dependencies = []
    files = ['22884', '23271']
    hgrepos = []
    issue_num = 12737
    keywords = []
    message_count = 20.0
    messages = ['141929', '141998', '142106', '142110', '143038', '143046', '144207', '144233', '144661', '144683', '144688', '144690', '144722', '144723', '144735', '379614', '379629', '379656', '398165', '398173']
    nosy_count = 9.0
    nosy_names = ['gvanrossum', 'loewis', 'terry.reedy', 'ezio.melotti', 'Arfrever', 'flox', 'tchrist', 'iritkatriel', 'vishvas.vasuki']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue12737'
    versions = ['Python 3.9', 'Python 3.10']
    

    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.