python / python/cpython

Unicode and ascii regular expressions do not agree on ascii space characters

Open
#90,027 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stdlib topic-regex topic-unicode type-feature
Dominant language
Python
Stars
77.2k
Forks
36k
Avg merge
1d 9h
Merged PRs (30d)
558

Description

BPO 45869
Nosy @ezio-melotti, @stevendaprano, @jorants, @arhadthedev
Files
  • unicode-ascii-space.py: Script that prints all differences in regex classes for ascii characters with or without re.A
  • 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 2021-11-22.13:27:59.303>
    labels = ['expert-regex', 'type-feature', '3.11']
    title = 'Unicode and acii regular expressions do not agree on ascii space characters'
    updated_at = <Date 2021-11-23.13:56:56.369>
    user = 'https://github.com/jorants'
    

    bugs.python.org fields:

    activity = <Date 2021-11-23.13:56:56.369>
    actor = 'arhadthedev'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Regular Expressions']
    creation = <Date 2021-11-22.13:27:59.303>
    creator = 'control-k'
    dependencies = []
    files = ['50457']
    hgrepos = []
    issue_num = 45869
    keywords = []
    message_count = 6.0
    messages = ['406773', '406787', '406796', '406818', '406819', '406837']
    nosy_count = 5.0
    nosy_names = ['ezio.melotti', 'mrabarnett', 'steven.daprano', 'control-k', 'arhadthedev']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue45869'
    versions = ['Python 3.11']
    

    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.

    Research direction

    Start by running unicode-ascii-space.py to reproduce the reported differences between Unicode and ASCII regular-expression classes. Read the linked issue discussion and identify the expected behavior before locating the relevant CPython regular-expression implementation and tests. Done means the agreed behavior is consistent for the reported ASCII space characters and covered by regression tests.

    Written by the indexing model from the issue text.

    Assessment

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

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.