Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for sre bug 610299 #37408

Closed
glchapman mannequin opened this issue Nov 4, 2002 · 6 comments
Closed

Patch for sre bug 610299 #37408

glchapman mannequin opened this issue Nov 4, 2002 · 6 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@glchapman
Copy link
Mannequin

glchapman mannequin commented Nov 4, 2002

BPO 633359
Nosy @gvanrossum, @loewis
Files
  • patch.txt
  • 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/gvanrossum'
    closed_at = <Date 2003-02-24.01:32:23.000>
    created_at = <Date 2002-11-04.16:48:09.000>
    labels = ['library']
    title = 'Patch for sre bug 610299'
    updated_at = <Date 2003-02-24.01:32:23.000>
    user = 'https://bugs.python.org/glchapman'

    bugs.python.org fields:

    activity = <Date 2003-02-24.01:32:23.000>
    actor = 'gvanrossum'
    assignee = 'gvanrossum'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2002-11-04.16:48:09.000>
    creator = 'glchapman'
    dependencies = []
    files = ['4677']
    hgrepos = []
    issue_num = 633359
    keywords = ['patch']
    message_count = 6.0
    messages = ['41546', '41547', '41548', '41549', '41550', '41551']
    nosy_count = 3.0
    nosy_names = ['gvanrossum', 'loewis', 'glchapman']
    pr_nums = []
    priority = 'high'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue633359'
    versions = ['Python 2.2']

    @glchapman
    Copy link
    Mannequin Author

    glchapman mannequin commented Nov 4, 2002

    Bug report 610299 points out this discrepancy:

    >>> re.compile(r'\w{1}', re.U).sub('X', u'hello caf\xe9') 
    u'XXXXX XXXX' 
    >>> re.compile(r'\w', re.U).sub('X', u'hello caf\xe9') 
    u'XXXXX XXX\xe9' 

    The problem is in sre_compile.py: the call to
    _compile_charset near the end of _compile_info forgets to
    pass in the flags, so that the info charset is not compiled
    with re.U. (The info charset is used when searching to find
    the first character at which a match could start; it is not
    generated for patterns beginning with a repeat like '\w{1}'.)

    The attached patch changes this call to pass in the flags; it
    is against the 2.2.2 version of sre_compile.py.

    @glchapman glchapman mannequin closed this as completed Nov 4, 2002
    @glchapman glchapman mannequin assigned gvanrossum Nov 4, 2002
    @glchapman glchapman mannequin added the stdlib Python modules in the Lib dir label Nov 4, 2002
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Nov 4, 2002

    Logged In: YES
    user_id=21627

    There's no uploaded file! You have to check the
    checkbox labeled "Check to Upload & Attach File"
    when you upload a file.

    Please try again.

    (This is a SourceForge annoyance that we can do
    nothing about. :-( )

    @glchapman
    Copy link
    Mannequin Author

    glchapman mannequin commented Nov 4, 2002

    Logged In: YES
    user_id=86307

    Sorry, I though I marked the checkbox (I know I went throught
    the browse button to find the file). Anyway, here's the file.

    @gvanrossum
    Copy link
    Member

    Logged In: YES
    user_id=6380

    Grabbing this since effbot seems unresponsive.

    @gvanrossum
    Copy link
    Member

    Logged In: YES
    user_id=6380

    Thanks!

    Fixed in 2.3. Keeping open for fixing in 2.2.3.

    @gvanrossum
    Copy link
    Member

    Logged In: YES
    user_id=6380

    Backport checked in.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant