[Patches] [ python-Patches-633359 ] Patch for sre bug 610299
SourceForge.net
noreply@sourceforge.net
Sun, 23 Feb 2003 06:15:25 -0800
Patches item #633359, was opened at 2002-11-04 11:48
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=633359&group_id=5470
Category: Library (Lib)
Group: Python 2.2.x
Status: Open
Resolution: Accepted
Priority: 7
Submitted By: Greg Chapman (glchapman)
>Assigned to: Guido van Rossum (gvanrossum)
Summary: Patch for sre bug 610299
Initial Comment:
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.
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2003-02-23 09:15
Message:
Logged In: YES
user_id=6380
Grabbing this since effbot seems unresponsive.
----------------------------------------------------------------------
Comment By: Greg Chapman (glchapman)
Date: 2002-11-04 13:28
Message:
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.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2002-11-04 12:43
Message:
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. :-( )
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=633359&group_id=5470