summaryrefslogtreecommitdiffstats
path: root/Lib/email
Commit message (Collapse)AuthorAgeFilesLines
* handle headers with no key (closes #19996)Benjamin Peterson2015-01-261-1/+10
| | | | Patch by Cory Benfield.
* Issue #23181: More "codepoint" -> "code point".Serhiy Storchaka2015-01-181-1/+1
|
* #21991: make headerregistry params property MappingProxyType.R David Murray2014-10-171-1/+2
| | | | | | | | | It is unlikely anyone is using the fact that the dictionary returned by the 'params' attribute was previously writable, but even if someone is the API is provisional so this kind of change is acceptable (and needed, to get the API "right" before it becomes official). Patch by Stéphane Wirtel.
* Closes #19434: fix copy-paste error in MIMENonMultipart docstring.Georg Brandl2014-10-021-1/+1
|
* #21091: make is_attachment a method.R David Murray2014-09-201-3/+17
| | | | | | Since EmailMessage is a provisional API we can fix API bugs in a maintenance release, but I used a trick suggested by Serhiy to maintain backward compatibility with 3.4.0/1.
* #21079: is_attachment now looks only at the value, ignoring parameters.R David Murray2014-09-201-3/+1
|
* Issue #21448: Fixed FeedParser feed() to avoid O(N**2) behavior when parsing ↵Serhiy Storchaka2014-08-121-8/+18
| | | | | | long line. Original patch by Raymond Hettinger.
* #20977: fix undefined name in the email module. Patch by Rose Ames.Ezio Melotti2014-08-041-3/+3
|
* #21476: Unwrap fp in BytesParser so the file isn't unexpectedly closed.R David Murray2014-06-261-1/+3
| | | | This makes the behavior match that of Parser. Patch by Vajrasky Kok.
* #21300: Clean up the docs for the email "policy" arguments.R David Murray2014-05-071-3/+6
|
* #20976: remove unneeded quopri import in email.utils.R David Murray2014-03-232-4/+2
|
* Issue #20976: pyflakes: Remove unused importsVictor Stinner2014-03-207-14/+1
|
* #11558: Better message if attach called on non-multipart.R David Murray2014-03-061-1/+5
| | | | Original patch by Varun Sharma.
* Merge: #14983: always add a line end after a MIME boundary marker.R David Murray2014-02-081-2/+1
|\
| * #14983: always add a line end after a MIME boundary marker.R David Murray2014-02-081-2/+1
| | | | | | | | | | | | | | | | | | This is more RFC compliant (see issue) and fixes a problem with signature verifiers rejecting the part when signed. There is some amount of backward compatibility concern here since it changes the output, but the RFC issue coupled with fixing the problem with signature verifiers seems worth the small risk of breaking code that depends on the current incorrect output.
* | Merge: #16983: Apply postel's law to encoded words inside quoted strings.R David Murray2014-02-081-0/+7
|\ \ | |/
| * #16983: Apply postel's law to encoded words inside quoted strings.R David Murray2014-02-081-0/+7
| | | | | | | | | | | | | | | | | | | | This applies only to the new parser. The old parser decodes encoded words inside quoted strings already, although it gets the whitespace wrong when it does so. This version of the patch only handles the most common case (a single encoded word surrounded by quotes), but I haven't seen any other variations of this in the wild yet, so its good enough for now.
* | Merge #19772: Do not mutate message when downcoding to 7bit.R David Murray2014-02-081-0/+14
|\ \ | |/
| * #19772: Do not mutate message when downcoding to 7bit.R David Murray2014-02-081-0/+14
| | | | | | | | | | | | | | | | | | This is a bit of an ugly hack because of the way generator pieces together the output message. The deepcopys aren't too expensive, though, because we know it is only called on messages that are not multiparts, and the payload (the thing that could be large) is an immutable object. Test and preliminary work on patch by Vajrasky Kok.
* | Merge: #17369: Improve handling of broken RFC2231 values in get_filename.R David Murray2014-02-071-0/+4
|\ \ | |/
| * #17369: Improve handling of broken RFC2231 values in get_filename.R David Murray2014-02-071-0/+4
| | | | | | | | This fixes a regression relative to python2.
* | Merge: #19063: the unicode-in-set_payload problem isn't getting fixed in 3.4.R David Murray2014-02-071-4/+3
|\ \ | |/
| * #19063: the unicode-in-set_payload problem isn't getting fixed in 3.4.R David Murray2014-02-071-4/+3
| |
* | #20531: Apply the 3.3 version of the #19063 fix.R David Murray2014-02-072-11/+26
| | | | | | | | | | So passing unicode to set_payload works again (but still doesn't do what you want when the message is serialized).
* | #20531: Revert e20f98a8ed71, the 3.4 version of the #19063 fix.R David Murray2014-02-072-29/+22
| |
* | #20476: use EmailMessage as factory if non-compat32 policy is used.R David Murray2014-02-072-9/+18
| | | | | | | | | | In 3.5 I will fix this right by adding a message_factory attribute to the policy.
* | Merge #20206, #5803: more efficient algorithm that doesn't truncate output.R David Murray2014-01-131-82/+60
|\ \ | |/ | | | | (No idea why test_tarfile is listed as changed...it isn't.)
| * #20206, #5803: more efficient algorithm that doesn't truncate output.R David Murray2014-01-131-82/+60
| | | | | | | | | | | | | | | | This fixes an edge case (20206) where if the input ended in a character needing encoding but there was no newline on the string, the last byte of the encoded character would be dropped. The fix is to use a more efficient algorithm, provided by Serhiy Storchaka (5803), that does not have the bug.
| * #19063: partially fix set_payload handling of non-ASCII string input.R David Murray2013-12-112-11/+26
| | | | | | | | | | | | This is a backward compatible partial fix, the complete fix requires raising an error instead of accepting the invalid input, so the real fix is only suitable for 3.4.
* | #19957: Simplify encode_7or8bit now that _payload is always str.R David Murray2013-12-131-13/+4
| | | | | | | | Patch by Vajrasky Kok, test enhancement by me.
* | #19063: fix set_payload handling of non-ASCII string input.R David Murray2013-12-112-22/+29
| | | | | | | | | | This version of the fix raises an error instead of accepting the invalid input (ie: if a non-ASCII string is used but no charset is specified).
* | Merge #19485: clarify get_param example.R David Murray2013-11-031-1/+1
|\ \ | |/
| * #19485: clarify get_param example.R David Murray2013-11-031-1/+1
| | | | | | | | Patch by Vajrasky Kok.
* | #18891: Complete new provisional email API.R David Murray2013-10-174-8/+480
| | | | | | | | | | | | | | | | | | | | | | | | This adds EmailMessage and, MIMEPart subclasses of Message with new API methods, and a ContentManager class used by the new methods. Also a new policy setting, content_manager. Patch was reviewed by Stephen J. Turnbull and Serhiy Storchaka, and reflects their feedback. I will ideally add some examples of using the new API to the documentation before the final release.
* | Merge #18324: set_payload now correctly handles binary input.R David Murray2013-08-222-16/+6
|\ \ | |/
| * #18324: set_payload now correctly handles binary input.R David Murray2013-08-222-16/+6
| | | | | | | | | | | | | | | | | | | | | | This also backs out the previous fixes for for #14360, #1717, and #16564. Those bugs were actually caused by the fact that set_payload didn't decode to str, thus rendering the model inconsistent. This fix does mean the data processed by the encoder functions goes through an extra encode/decode cycle, but it means the model is always consistent. Future API updates will provide a better way to encode payloads, which will bypass this minor de-optimization. Tests by Vajrasky Kok.
* | Merge typo fixes from 3.3.Ezio Melotti2013-08-102-4/+4
|\ \ | |/
| * Fix a couple of typos.Ezio Melotti2013-08-102-4/+4
| |
* | #18600: add policy to add_string, and as_bytes and __bytes__ methods.R David Murray2013-08-091-8/+36
| | | | | | | | | | | | | | This was triggered by wanting to make the doctest in email.policy.rst pass; as_bytes and __bytes__ are clearly useful now that we have BytesGenerator. Also updated the Message docs to document the policy keyword that was added in 3.3.
* | Merge: #18437: fix comment typo.R David Murray2013-07-131-1/+1
|\ \ | |/
| * #18437: fix comment typo.R David Murray2013-07-131-1/+1
| |
* | Merge: #18431: Decode encoded words in atoms in new email parser.R David Murray2013-07-121-2/+21
|\ \ | |/
| * #18431: Decode encoded words in atoms in new email parser.R David Murray2013-07-121-2/+21
| | | | | | | | | | | | There is more to be done here in terms of accepting RFC invalid input that some mailers accept, but this covers the valid RFC places where encoded words can occur in structured headers.
* | Merge: #18044: Fix parsing of encoded words of the form =?utf8?q?=XX...?=R David Murray2013-07-111-36/+7
|\ \ | |/
| * #18044: Fix parsing of encoded words of the form =?utf8?q?=XX...?=R David Murray2013-07-111-36/+7
| | | | | | | | | | | | | | | | | | | | The problem was I was only checking for decimal digits after the third '?', not for *hex* digits :(. This changeset also fixes a couple of comment typos, deletes an unused function relating to encoded word parsing, and removed an invalid 'if' test from the folding function that was revealed by the tests written to validate this issue.
* | #18380: merge with 3.3.Ezio Melotti2013-07-061-1/+1
|\ \ | |/
| * #18380: pass regex flags to the right argument. Patch by Valentina ↵Ezio Melotti2013-07-061-1/+1
| | | | | | | | Mukhamedzhanova.
* | Merge #14360: make encoders.encode_quopri work.R David Murray2013-06-271-2/+6
|\ \ | |/
| * #14360: make encoders.encode_quopri work.R David Murray2013-06-271-2/+6
| | | | | | | | | | | | | | | | | | There were no tests for the encoders module. encode_base64 worked because it is the default and so got tested implicitly elsewhere, and we use encode_7or8bit internally, so that worked, too. I previously fixed encode_noop, so this fix means that everythign in the encoders module now works, hopefully correctly. Also added an explicit test for encode_base64.
* | #11454: Reduce email module load time, improve surrogate check efficiency.R David Murray2013-06-261-4/+10
| | | | | | | | | | | | | | The new _has_surrogates code was suggested by Serhiy Storchaka. See the issue for timings, but it is far faster than any other alternative, and also removes the load time that we previously incurred from compiling the complex regex this replaces.