Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | fix broken (unexecuted) test | Anthony Baxter | 2005-06-08 | 1 | -3/+3 |
| | |||||
* | Fixes for SF #1076485, which I'll apply to the CVS head too. The problem was | Barry Warsaw | 2004-12-05 | 4 | -4/+274 |
| | | | | | | | | | | | | | | | | caused by a self._input.readline() call that wasn't checking for the NeedsMoreData marker. msg_43.txt contains a message that illustrates the problem, when email.message_from_*() is called. That interface uses the Parser API, which splits reads into 8192 byte chunks. It so happens that for the test message, the 8192 chunk falls inside a message/delivery-status, which is where in the FeedParser the readline() call was that didn't check for NeedsMoreData. I also added an assert to unreadline() so it'll be more evident if an attempt to push back NeedsMoreData ever happens again. Bump the email package version number. | ||||
* | RFC 2822 describes the characters allowed in a header field name. Conform to | Barry Warsaw | 2004-11-29 | 2 | -1/+19 |
| | | | | this, and add test cases. | ||||
* | There's likely nothing more to do to the email package before Python 2.4 is | Barry Warsaw | 2004-11-29 | 1 | -1/+1 |
| | | | | final, so I'm marking email's version number as "3.0" (e.g. final). | ||||
* | Fix for SF bug #1072623. When the last line of the input string does not end | Barry Warsaw | 2004-11-28 | 2 | -1/+16 |
| | | | | | | | | | in a newline, and it's an end boundary, the FeedParser wasn't recognizing it as such. Tweak the regexp to make the ending linesep optional. For grins, clear self._partial when closing the BufferedSubFile. Added a test case. | ||||
* | get_boundary(): Fix for SF bug #1060941. RFC 2046 says boundaries may begin | Barry Warsaw | 2004-11-06 | 1 | -1/+2 |
| | | | | | | -- but not end -- with whitespace. I will backport to Python 2.3. | ||||
* | test_boundary_with_leading_space(): Test case for SF bug #1060941. RFC 2046 | Barry Warsaw | 2004-11-06 | 1 | -0/+19 |
| | | | | | | says boundaries may begin -- but not end -- with whitespace. I will backport to Python 2.3. | ||||
* | Whitespace normalization. | Tim Peters | 2004-10-12 | 1 | -1/+1 |
| | |||||
* | Added a usegmt flag to email.Utils.formatdate - this allows it to be | Anthony Baxter | 2004-10-11 | 2 | -2/+18 |
| | | | | | used to replace rfc822.formatdate for protocols like HTTP (where 'GMT' must be the timezone string). | ||||
* | All known bugs are closed, and Python 2.4b1 is coming out soon, so bump | Barry Warsaw | 2004-10-09 | 1 | -1/+1 |
| | | | | email's version number to 3.0b1. | ||||
* | Fix SF bug # 1030941. In _parsegen(), in the clause where we're | Barry Warsaw | 2004-10-09 | 1 | -3/+7 |
| | | | | | | | capturing_preamble but we found a StartBoundaryNotFoundDefect, we need to consume all lines from the current position to the EOF, which we'll set as the epilogue of the current message. If we're not at EOF when we return from here, the outer message's capturing_preamble assertion will fail. | ||||
* | An example message for SF bug # 1030941. | Barry Warsaw | 2004-10-09 | 1 | -0/+20 |
| | |||||
* | test_missing_start_boundary(): A test for SF bug # 1030941. | Barry Warsaw | 2004-10-09 | 1 | -0/+15 |
| | |||||
* | __init__(): Coerce the input_charset to unicode (with ascii encoding) before | Barry Warsaw | 2004-10-09 | 1 | -2/+3 |
| | | | | | | calling .lower() on it. This fixes the problem described in SF patch # 866982 where in the tr_TR.ISO-8859-9 locale, 'I'.lower() isn't 'i'. unicodes are locale insensitive. | ||||
* | Fix test for FeedParser results. | Barry Warsaw | 2004-10-03 | 1 | -2/+2 |
| | |||||
* | as_string(): Indicate that this mangles From_ lines. | Barry Warsaw | 2004-10-03 | 1 | -1/+2 |
| | |||||
* | Big email 3.0 API changes, with updated unit tests and documentation. | Barry Warsaw | 2004-10-03 | 24 | -371/+230 |
| | | | | | | | | | | | | | | | | | Briefly (from the NEWS file): - Updates for the email package: + All deprecated APIs that in email 2.x issued warnings have been removed: _encoder argument to the MIMEText constructor, Message.add_payload(), Utils.dump_address_pair(), Utils.decode(), Utils.encode() + New deprecations: Generator.__call__(), Message.get_type(), Message.get_main_type(), Message.get_subtype(), the 'strict' argument to the Parser constructor. These will be removed in email 3.1. + Support for Python earlier than 2.3 has been removed (see PEP 291). + All defect classes have been renamed to end in 'Defect'. + Some FeedParser fixes; also a MultipartInvariantViolationDefect will be added to messages that claim to be multipart but really aren't. + Updates to documentation. | ||||
* | Test cases and fixes for bugs described in patch #873418: email/Message.py: | Barry Warsaw | 2004-08-16 | 2 | -2/+14 |
| | | | | del_param fails when specifying a header. | ||||
* | Resolution of bug #997368, "strftime() backward compatibility". | Barry Warsaw | 2004-08-07 | 2 | -3/+3 |
| | | | | | | | | | Specifically, time.strftime() no longer accepts a 0 in the yday position of a time tuple, since that can crash some platform strftime() implementations. parsedate_tz(): Change the return value to return 1 in the yday position. Update tests in test_rfc822.py and test_email.py | ||||
* | Resolution of SF bug #1002475 and patch #1003693; Header lines that end in | Barry Warsaw | 2004-08-07 | 2 | -3/+33 |
| | | | | | | | | | | \r\n only get the \n stripped, not the \r (unless it's the last header which does get the \r stripped). Patch by Tony Meyer. test_whitespace_continuation_last_header(), test_strip_line_feed_and_carriage_return_in_headers(): New tests. _parse_headers(): Be sure to strip \r\n from the right side of header lines. | ||||
* | _parsegen(): Add a missing check for NeedMoreData. | Barry Warsaw | 2004-05-15 | 1 | -0/+3 |
| | |||||
* | forward porting from release23-maint | Barry Warsaw | 2004-05-13 | 1 | -0/+10 |
| | |||||
* | test_boundary_in_non_multipart(): Added a test for SF bug # 846938. | Barry Warsaw | 2004-05-13 | 1 | -0/+15 |
| | |||||
* | encode_7or8bit(): Clearing out some old patches; iso-2202 is non-ASCII but | Barry Warsaw | 2004-05-13 | 1 | -5/+10 |
| | | | | still 7-bit. | ||||
* | readline(): RFC 2046, section 5.1.2 (and partially 5.1) both state that the | Barry Warsaw | 2004-05-13 | 1 | -3/+5 |
| | | | | | | | | | | parser must recognize outer boundaries in inner parts. So cruise through the EOF stack backwards testing each predicate against the current line. There's still some discussion about whether this is (always) the best thing to do. Anthony would rather parse these messages as if the outer boundaries were ignored. I think that's counter to the RFC, but might be practically more useful. Can you say behavior flag? (ug). | ||||
* | test_nested_inner_contains_outer_boundary(), test_nested_with_same_boundary(): | Barry Warsaw | 2004-05-13 | 1 | -0/+36 |
| | | | | Two evil samples from Anthony's MIME torture tests. | ||||
* | _structure(): Make sure all output goes the to fp object. | Barry Warsaw | 2004-05-13 | 1 | -2/+2 |
| | |||||
* | Another evil test from Anthony's suite. This one has an inner part with the | Barry Warsaw | 2004-05-13 | 1 | -0/+83 |
| | | | | same boundary as the outer part. | ||||
* | A boiled down example from Anthony's MIME torture tests. This one has a | Barry Warsaw | 2004-05-13 | 1 | -0/+101 |
| | | | | separating boundary for an outer part inside an inner part. | ||||
* | Tests for message/external-body and for duplicate boundary lines. | Barry Warsaw | 2004-05-11 | 1 | -3/+12 |
| | |||||
* | More boiled down tests from Anthony's big torture suite. | Barry Warsaw | 2004-05-11 | 1 | -2/+26 |
| | |||||
* | A boiled down message/external-body example from Anthony's torture test. | Barry Warsaw | 2004-05-11 | 1 | -0/+40 |
| | |||||
* | An example with multiple boundary lines. | Barry Warsaw | 2004-05-11 | 1 | -0/+22 |
| | |||||
* | _parsegen(): Move the message/rfc822 clause to after the | Barry Warsaw | 2004-05-11 | 1 | -12/+13 |
| | | | | | | message/delivery-status clause, and genericize it to handle all (other) message/* content types. This lets us correctly parse 2 more of Anthony's MIME torture tests (specifically, the message/external-body examples). | ||||
* | _parsegen(): Watch out for empty epilogues. | Barry Warsaw | 2004-05-11 | 1 | -4/+5 |
| | |||||
* | _parse_headers(): Strip a trailing newline from the envelope header. Closes | Barry Warsaw | 2004-05-10 | 1 | -0/+4 |
| | | | | SF #951088. | ||||
* | _split_ascii(): Small optimization by RH. | Barry Warsaw | 2004-05-10 | 1 | -1/+1 |
| | |||||
* | SF patch # 884030 by Amit Aronovitch; fixes the _subpart argument to match | Barry Warsaw | 2004-05-09 | 1 | -5/+7 |
| | | | | documented semantics. | ||||
* | test_mime_attachments_in_constructor(): New test to check for SF bug # 884030. | Barry Warsaw | 2004-05-09 | 1 | -0/+9 |
| | |||||
* | we dont support any Python's before 2.3 now. | Barry Warsaw | 2004-05-09 | 2 | -139/+0 |
| | |||||
* | Update to Python 2.3, getting rid of backward compatiblity crud. | Barry Warsaw | 2004-05-09 | 5 | -84/+19 |
| | |||||
* | Update to Python 2.3, getting rid of backward compatiblity crud. | Barry Warsaw | 2004-05-09 | 1 | -281/+20 |
| | | | | This Parser is now just a backward compatible front-end to the FeedParser. | ||||
* | Update to Python 2.3, getting rid of backward compatiblity crud. | Barry Warsaw | 2004-05-09 | 1 | -28/+17 |
| | |||||
* | Update to Python 2.3, getting rid of backward compatiblity crud. We don't | Barry Warsaw | 2004-05-09 | 1 | -10/+52 |
| | | | | need the _compat21 or _compat22 modules either. | ||||
* | Update to Python 2.3, getting rid of backward compatiblity crud. Get rid of a | Barry Warsaw | 2004-05-09 | 1 | -27/+6 |
| | | | | bunch of module globals that aren't used. | ||||
* | Update to Python 2.3, getting rid of backward compatiblity crud. Get rid of a | Barry Warsaw | 2004-05-09 | 1 | -57/+29 |
| | | | | | | | | | bunch of module globals that aren't used. __maxheaderlen -> _maxheaderlen _handle_multipart(): This should be more RFC compliant now, and does match the updated/fixed semantics for preamble and epilogue. | ||||
* | An updated FeedParser that should be RFC complaint, passes all existing | Barry Warsaw | 2004-05-09 | 1 | -289/+359 |
| | | | | | | (standard) tests, and doesn't throw parse errors. I still need throw Anthony's torture test at it, but I wanted to get this checked in and off my disk. | ||||
* | Add MessageDefect and subclasses. | Barry Warsaw | 2004-05-09 | 1 | -4/+27 |
| | |||||
* | Update to Python 2.3, getting rid of backward compatiblity crud. | Barry Warsaw | 2004-05-09 | 1 | -16/+7 |
| | |||||
* | Like msg_12.txt but with some extra vertical whitespace around the inner | Barry Warsaw | 2004-05-09 | 1 | -0/+38 |
| | | | | message's end boundary. |