| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Will port to Python 2.4.
|
| |
|
|
|
|
|
| |
Port from Python 2.3/email 2.5: Add a test for the tm_yday field is 1 in the
return of parsedate().
|
|
|
|
|
| |
Change headerRE as suggested in the bug report, so that single character
headers are accepted. Test case added too. Will backport to Python 2.4.
|
|
|
|
|
|
|
|
|
|
|
| |
SF bug #1403349 solution for email 3.0; some MUAs use the 'file' parameter
name in the Content-Distribution header, so Message.get_filename() should fall
back to using that. Will port to the Python 2.5 trunk.
Also, bump the email package version to 3.0.1 for eventual release. Of
course, add a test case too.
XXX Need to update the documentation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
this, and add test cases.
|
|
|
|
| |
final, so I'm marking email's version number as "3.0" (e.g. final).
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
-- but not end -- with whitespace.
I will backport to Python 2.3.
|
|
|
|
|
|
| |
says boundaries may begin -- but not end -- with whitespace.
I will backport to Python 2.3.
|
| |
|
|
|
|
|
| |
used to replace rfc822.formatdate for protocols like HTTP (where 'GMT' must
be the timezone string).
|
|
|
|
| |
email's version number to 3.0b1.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
del_param fails when specifying a header.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
\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.
|
| |
|
| |
|
| |
|
|
|
|
| |
still 7-bit.
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
Two evil samples from Anthony's MIME torture tests.
|
| |
|
|
|
|
| |
same boundary as the outer part.
|
|
|
|
| |
separating boundary for an outer part inside an inner part.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
| |
SF #951088.
|
| |
|
|
|
|
| |
documented semantics.
|
| |
|
| |
|
| |
|
|
|
|
| |
This Parser is now just a backward compatible front-end to the FeedParser.
|
| |
|
|
|
|
| |
need the _compat21 or _compat22 modules either.
|
|
|
|
| |
bunch of module globals that aren't used.
|