classification
Title: email.feedparser regular expression bug (NLCRE_crack)
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.2, Python 3.1, Python 2.7, Python 2.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: barry, jkg, pitrou, tjreedy, tony_nelson (5)
Priority: Keywords patch

Created on 2009-07-11 19:58 by jkg, last changed 2009-07-17 22:34 by tjreedy.

Files
File name Uploaded Description Edit Remove
test_nlcre.py jkg, 2009-07-11 19:58 unittest-based test
nlcre.patch jkg, 2009-07-11 20:01 unified diff for Python 3.1 source
nlcre_full.patch jkg, 2009-07-12 18:08 Combined patch and unit test.
Messages (6)
msg90433 - (view) Author: (jkg) Date: 2009-07-11 19:58
If the parser is fed a chunk which ends with '\r' and the next chunk
begins with '\n', it incorrectly parses this into a line ending with
'\r' and an empty line ending with '\n' instead of a single line ending
with '\r\n'.

Test attached. Patch to follow.
msg90434 - (view) Author: (jkg) Date: 2009-07-11 20:01
Patch.
msg90449 - (view) Author: Antoine Pitrou (pitrou) Date: 2009-07-12 15:45
Can you include your unit test in your patch rather than as a separate
script? Existing unit tests are in Lib/test.
msg90454 - (view) Author: (jkg) Date: 2009-07-12 18:07
Combined patch as requested by pitrou.

(Sorry. This is my first submission.)
msg90463 - (view) Author: Antoine Pitrou (pitrou) Date: 2009-07-12 23:42
Sorry for giving you a slightly wrong indication. The email tests are
called from Lib/test/test_email.py, but it redirects to
Lib/email/test/*. In any case, there's no point in creating a separate
test script for such a detail, you should add your test to one of the
existing test scripts instead.
msg90643 - (view) Author: Terry J. Reedy (tjreedy) Date: 2009-07-17 22:34
I believe both 2.4 and 3.0 are no longer maintained. 2.5 only gets
security fixes. On the otherhand, fix should go into 3.2 ;-).
History
Date User Action Args
2009-07-17 22:34:44tjreedysetnosy: + tjreedy

messages: + msg90643
versions: + Python 3.2, - Python 2.5, Python 2.4, Python 3.0
2009-07-12 23:42:46pitrousetmessages: + msg90463
2009-07-12 18:08:03jkgsetfiles: + nlcre_full.patch

messages: + msg90454
2009-07-12 15:45:20pitrousetnosy: + pitrou
messages: + msg90449
2009-07-11 20:01:27jkgsetfiles: + nlcre.patch
keywords: + patch
messages: + msg90434
2009-07-11 19:58:38jkgcreate