summaryrefslogtreecommitdiffstats
path: root/Lib/email
Commit message (Collapse)AuthorAgeFilesLines
* AddrlistClass -> AddressListBarry Warsaw2002-04-121-2/+2
|
* Sync'ing with standalone email package 2.0.1. This adds support forBarry Warsaw2002-04-1016-96/+1438
| | | | | | | | | non-us-ascii character sets in headers and bodies. Some API changes (with DeprecationWarnings for the old APIs). Better RFC-compliant implementations of base64 and quoted-printable. Updated test cases. Documentation updates to follow (after I finish writing them ;).
* Removed two unused imports. Closes patch #525225.Barry Warsaw2002-03-031-4/+0
| | | | 2.2.1 candidate (but not terribly important).
* _parsebody(): When adding subparts to a multipart container, make sureBarry Warsaw2002-01-271-2/+7
| | | | | | that the first subpart added makes the payload a list object. Otherwise, a multipart/* with only one subpart will not have the proper structure.
* decode(), encode(): Accepting the minor optimizations from SF patchBarry Warsaw2001-12-031-6/+7
| | | | | #486375, but not the rest of it, since that changes the documented semantics of encode().
* More typo fixes.Barry Warsaw2001-11-241-2/+2
|
* Docstring typo fix.Greg Ward2001-11-242-2/+2
|
* formatdate(): Jason Mastaler correctly points out that divmod with aBarry Warsaw2001-11-191-2/+8
| | | | | | negative modulus won't return the right values. So always do positive modulus on an absolute value and twiddle the sign as appropriate after the fact.
* formatdate(): The calculation of the minutes part of the zone wasBarry Warsaw2001-11-191-1/+2
| | | | | | | | incorrect for "uneven" timezones. This algorithm should work for even timezones (e.g. America/New_York) and uneven timezones (e.g. Australia/Adelaide and America/St_Johns). Closes SF bug #483231.
* Forgot to import time.Barry Warsaw2001-11-091-0/+1
|
* formatdate(): A better docstring.Barry Warsaw2001-11-091-4/+7
|
* formatdate(): An implementation to replace the one borrowed fromBarry Warsaw2001-11-091-1/+37
| | | | | | | | | | rfc822.py. The old rfc822.formatdate() produced date strings using obsolete syntax. The new version produces the preferred RFC 2822 dates. Also, an optional argument `localtime' is added, which if true, produces a date relative to the local timezone, with daylight savings time properly taken into account.
* walk(): Fix docstring; traversal is depth-first. Closes mimelib bugBarry Warsaw2001-11-051-1/+1
| | | | #477864.
* A fix for SF bug #472560, extra newlines returned by get_param() whenBarry Warsaw2001-10-251-1/+1
| | | | | | | | the separating semi-colon shows up on a continuation line (legal, but weird). Bug reported and fixed by Matthew Cowles. Test case and sample email included.
* Another merge from mimelib:Barry Warsaw2001-10-191-0/+2
| | | | | | _handle_multipart(): If there is an epilogue and the epilogue does not itself start with a newline, add a newline before writing the epilogue. Closes SF bug #472481.
* Two merges from the mimelib project:Barry Warsaw2001-10-171-4/+35
| | | | | | | | _split_header(): Split on folding whitespace if the attempt to split on semi-colons failed. _split_header(): Patch by Matthew Cowles for fixing SF bug # 471918, Generator splitting long headers.
* typed_subpart_iterator(): When getting the main type use 'text' as theBarry Warsaw2001-10-151-2/+2
| | | | | | failobj, and when getting the subtype use 'plain' as the failobj. text/plain is supposed to be the default if the message contains no Content-Type: header.
* HeaderParser: A new subclass of Parser which only parses the messageBarry Warsaw2001-10-111-0/+16
| | | | | | headers. It does not parse the body of the message, instead simply assigning it as a string to the container's payload. This can be much faster when you're only interested in a message's header.
* An audio/* class, like MIMEImage, contributed by Anthony Baxter.Barry Warsaw2001-10-091-0/+71
| | | | | Rewritten for style and the email package naming conventions by Barry.
* Fix __all__ to the current list of exported modules (must pass theBarry Warsaw2001-10-091-3/+4
| | | | tests in test_email.py).
* get_all(): We never returned failobj if we found no matching headers.Barry Warsaw2001-10-091-0/+4
| | | | Fix that, and also make the docstring describe failobj.
* Give me back my page breaks.Barry Warsaw2001-10-0412-22/+22
|
* Whitespace normalization.Tim Peters2001-10-0412-23/+23
|
* _parsebody(): Use get_boundary() and get_type().Barry Warsaw2001-09-261-10/+16
| | | | | | | Also, add a clause to the big-if to handle message/delivery-status content types. These create a message with subparts that are Message instances, which best represent the header blocks of this content type.
* has_key(): Implement in terms of get().Barry Warsaw2001-09-261-33/+58
| | | | | | | | | | | | | | | get_type(): Use a compiled regular expression, which can be shared. _get_params_preserve(): A helper method which extracts the header's parameter list preserving value quoting. I'm not sure that this needs to be a public method. It's necessary because we want get_param() and friends to return the unquoted parameter value, however we want the quote-preserved form for set_boundary(). get_params(), get_param(), set_boundary(): Implement in terms of _get_params_preserve(). walk(): Yield ourself first, then recurse over our subparts (if any).
* __init__(): Arguments major renamed to maintype and minor renamed toBarry Warsaw2001-09-261-3/+3
| | | | subtype for consistency with the rest of the package.
* Updated docstrings. Also,Barry Warsaw2001-09-261-7/+7
| | | | | | typed_subpart_iterator(): Arguments major renamed to maintype and minor renamed to subtype for consistency with the rest of the package.
* Image.py and class Image => MIMEImage.py and MIMEImageBarry Warsaw2001-09-264-36/+40
| | | | | | | | | Text.py and class Text => MIMEText.py and MIMEText MessageRFC822.py and class MessageRFC822 => MIMEMessage.py and MIMEMessage These are renamed so as to be more consistent; these are MIME specific derived classes for when creating the object model out of whole cloth.
* In class Generator:Barry Warsaw2001-09-261-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | _handle_text(): If the payload is None, then just return (i.e. don't write anything). Subparts of message/delivery-status types will have this property since they are just blocks of headers. Also, when raising the TypeError, include the type of the payload in the error message. _handle_multipart(), _handle_message(): When creating a clone of self, pass in our _mangle_from_ and maxheaderlen flags so the clone has the same behavior. _handle_message_delivery_status(): New method to do the proper printing of message/delivery-status type messages. These have to be handled differently than other message/* types because their payloads are subparts containing just blocks of headers. In class DecodedGenerator: _dispatch(): Skip over multipart/* messages since we don't care about them, and don't want the non-text format to appear in the printed results.
* cosmeticBarry Warsaw2001-09-261-0/+1
|
* The email package version 1.0, prototyped as mimelibBarry Warsaw2001-09-2312-0/+1302
<http://sf.net/projects/mimelib>. There /are/ API differences between mimelib and email, but most of the implementations are shared (except where cool Py2.2 stuff like generators are used).