Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(52)

#17381: IGNORECASE breaks unicode literal range matching

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 6 months ago by chris
Modified:
5 years, 5 months ago
Reviewers:
pitrou, storchaka
CC:
ezio.melotti, mrabarnett, devnull_psf.upfronthosting.co.za, storchaka, chris_improbable.org
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Patch Set 3 #

Patch Set 4 #

Total comments: 10

Patch Set 5 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/sre_compile.py View 1 2 3 4 6 chunks +21 lines, -14 lines 0 comments Download
Lib/sre_constants.py View 1 2 3 4 4 chunks +6 lines, -3 lines 0 comments Download
Lib/test/test_re.py View 1 2 3 4 1 chunk +19 lines, -0 lines 0 comments Download
Modules/_sre.c View 1 2 3 4 5 chunks +25 lines, -3 lines 2 comments Download
Modules/sre_constants.h View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
Modules/sre.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
Modules/sre_lib.h View 1 2 3 4 7 chunks +21 lines, -6 lines 2 comments Download

Messages

Total messages: 4
pitrou_free.fr
http://bugs.python.org/review/17381/diff/13011/Lib/sre_compile.py File Lib/sre_compile.py (right): http://bugs.python.org/review/17381/diff/13011/Lib/sre_compile.py#newcode230 Lib/sre_compile.py:230: tail.append((op, av)) I don't understand why calling fixup() is ...
5 years, 5 months ago #1
storchaka_gmail.com
http://bugs.python.org/review/17381/diff/13011/Lib/sre_compile.py File Lib/sre_compile.py (right): http://bugs.python.org/review/17381/diff/13011/Lib/sre_compile.py#newcode230 Lib/sre_compile.py:230: tail.append((op, av)) On 2014/10/08 22:09:06, AntoinePitrou wrote: > I ...
5 years, 5 months ago #2
pitrou_free.fr
This looks mostly good to me. http://bugs.python.org/review/17381/diff/13014/Modules/_sre.c File Modules/_sre.c (right): http://bugs.python.org/review/17381/diff/13014/Modules/_sre.c#newcode141 Modules/_sre.c:141: return ((ch) < ...
5 years, 5 months ago #3
storchaka_gmail.com
5 years, 5 months ago #4
http://bugs.python.org/review/17381/diff/13014/Modules/_sre.c
File Modules/_sre.c (right):

http://bugs.python.org/review/17381/diff/13014/Modules/_sre.c#newcode141
Modules/_sre.c:141: return ((ch) < 128 ? (unsigned int)sre_char_lower[ch] : ch);
On 2014/10/30 23:06:55, AntoinePitrou wrote:
> Might as well replace this with Py_TOLOWER()?

Already done in issue #22584.

http://bugs.python.org/review/17381/diff/13014/Modules/sre_lib.h
File Modules/sre_lib.h (right):

http://bugs.python.org/review/17381/diff/13014/Modules/sre_lib.h#newcode149
Modules/sre_lib.h:149: if (set[0] <= ch && ch <= set[1])
On 2014/10/30 23:06:55, AntoinePitrou wrote:
> I think you should add a comment explaining why state->lower() is not needed
> here.

Done.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+