summaryrefslogtreecommitdiffstats
path: root/Lib/email
Commit message (Collapse)AuthorAgeFilesLines
* #14291: if a header has non-ascii unicode, default to CTE using utf-8R David Murray2012-03-142-3/+25
| | | | | | | | | | | | | | In Python2, if a unicode string was assigned as the value of a header, email would automatically CTE encode it using the UTF8 charset. This capability was lost in the Python3 translation, and this patch restores it. Patch by Ali Ikinci, assisted by R. David Murray. I also added a fix for the mailbox test that was depending (with a comment that it was a bad idea to so depend) on non-ASCII causing message_from_string to raise an error. It now uses support.patch to induce an error during message serialization.
* Fix few typos.Florent Xicluna2011-11-111-1/+1
|
* #11584: make Header and make_header handle binary unknown-8bit inputR David Murray2011-06-182-1/+19
| | | | | | | | Analogous to the decode_header fix, this fix makes Header.append and make_header correctly handle the unknown-8bit charset introduced by email5.1, when the input to them is binary strings. Previous to this fix the make_header(decode_header(x)) == x invariant was broken in the face of the unknown-8bit charset.
* #11584: make decode_header handle Header objects correctlyR David Murray2011-06-182-4/+5
| | | | This updates b21fdfa0019c, which fixed this bug incorrectly.
* #11492: rewrite header folding algorithm. Less code, more passing tests.R David Murray2011-04-182-197/+241
|
* Improve message.py test coverage to 100%.R David Murray2011-04-161-0/+56
| | | | | coverage.py reports 99% on branch coverage, but that appears to be a bug or limitation in coverage.py.
* Merge with 3.1.Ezio Melotti2011-04-131-1/+1
|\
| * Fix typo in docstring.Ezio Melotti2011-04-131-1/+1
| |
* | Merge: Add maxlinelen to docstring, delete obsolete wordingR David Murray2011-04-121-6/+6
|\ \ | |/
| * Add maxlinelen to docstring, delete obsolete wordingR David Murray2011-04-121-6/+6
| |
* | Merge #11492: fix header truncation on folding when there are runs of split ↵R David Murray2011-04-082-3/+14
|\ \ | |/ | | | | | | | | chars. Not a complete fix for this issue.
| * #11492: fix header truncation on folding when there are runs of split chars.R David Murray2011-04-082-3/+14
| | | | | | | | Not a complete fix for this issue.
* | Merge: Improve test coverage of _split_ascii method.R David Murray2011-04-081-0/+43
|\ \ | |/
| * Improve test coverage of _split_ascii method.R David Murray2011-04-081-0/+43
| |
* | #11605: don't use set/get_payload in feedparser; they do conversions.R David Murray2011-04-062-2/+49
| | | | | | | | | | Really the whole API needs to be gone over to restore the separation of concerns; but that's what email6 is about.
* | #11584: Since __getitem__ returns headers, make decode_header handle them.R David Murray2011-03-252-0/+20
| | | | | | | | | | | | | | Why I consider this a bug rather than an API change: the API change was to Message, which didn't used to return Headers unless you added them yourself. Now it does (for 8bit binary header input), so decode_header needs to be able to handle them.
* | Merge #11606: improved body_encode algorithm, no longer produces overlong linesR David Murray2011-03-242-61/+103
|\ \ | |/
| * #11606: improved body_encode algorithm, no longer produces overlong linesR David Murray2011-03-242-61/+103
| | | | | | | | Algorithm and initial patch by Michael Henry.
* | Merge #11590: fix quoprimime decode handling of empty strings and line endings.R David Murray2011-03-232-3/+18
|\ \ | |/
| * #11590: fix quoprimime decode handling of empty strings and line endings.R David Murray2011-03-232-3/+18
| |
* | Merge #11589: add additional tests for the email quoprimime module.R David Murray2011-03-231-14/+178
|\ \ | |/
| * #11589: add additional tests for the email quoprimime module.R David Murray2011-03-231-14/+178
| | | | | | | | Patch by Michael Henry.
* | #11243: tests and fixes for handling of 'dirty data' in additional methodsR David Murray2011-03-172-5/+60
| |
* | Merge #11401 fix from 3.1.R David Murray2011-03-162-1/+8
|\ \ | |/
| * #11401: handle headers with no value.R David Murray2011-03-162-1/+8
| |
* | Merge #9298 fix.R David Murray2011-03-162-6/+16
|\ \ | |/
| * #9298: restore proper folding of base64 encoded bodies.R David Murray2011-03-162-6/+16
| | | | | | | | Patch by Yves Dorfsman.
* | #11565: Merge with 3.1.Ezio Melotti2011-03-161-1/+1
|\ \ | |/
| * #11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-161-1/+1
| |
* | Merge #11555 as_string doc fix from 3.1.R David Murray2011-03-151-2/+1
|\ \ | |/
| * #11555: update doc for 3.x change to as_string mangle_from default.R David Murray2011-03-151-2/+1
| |
* | Remove obsolete comment.R David Murray2011-03-151-1/+1
| |
* | #11554: reactivate test_email_codecs, and make it pass.R David Murray2011-03-154-22/+46
| | | | | | | | | | | | | | | | | | The fix is to charset.py, which was not doing the encoding to the correct output character set when doing a body_encode for either the shift-jis or euc-jp charsets. There's also a fix for handling a bytes input in encoders.py. Patch by Michael Henry, comment changes by me.
* | #11515: Merge with 3.1.Ezio Melotti2011-03-151-1/+1
|\ \ | |/
| * #11515: fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-151-1/+1
| |
| * Merged revisions ↵Georg Brandl2011-02-251-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 87627,87638,87739,87760,87771,87787,87984,87986,88108,88115,88144,88165,88329,88364-88365,88369-88370,88423-88424 via svnmerge from svn+ssh://svn.python.org/python/branches/py3k ........ r87627 | georg.brandl | 2011-01-02 15:23:43 +0100 (So, 02 Jan 2011) | 1 line #1665333: add more docs for optparse.OptionGroup. ........ r87638 | georg.brandl | 2011-01-02 20:07:51 +0100 (So, 02 Jan 2011) | 1 line Fix code indentation. ........ r87739 | georg.brandl | 2011-01-04 18:27:13 +0100 (Di, 04 Jan 2011) | 1 line Fix exception catching. ........ r87760 | georg.brandl | 2011-01-05 11:59:48 +0100 (Mi, 05 Jan 2011) | 1 line Fix duplicate end tag. ........ r87771 | georg.brandl | 2011-01-05 22:47:47 +0100 (Mi, 05 Jan 2011) | 1 line On Py3k, -tt and -3 are no-op and unsupported respectively. ........ r87787 | georg.brandl | 2011-01-06 10:15:45 +0100 (Do, 06 Jan 2011) | 1 line Remove doc for nonexisting parameter. ........ r87984 | georg.brandl | 2011-01-13 08:24:40 +0100 (Do, 13 Jan 2011) | 1 line Add semicolon for consistency. ........ r87986 | georg.brandl | 2011-01-13 08:31:18 +0100 (Do, 13 Jan 2011) | 1 line Fix the example output of count(). ........ r88108 | georg.brandl | 2011-01-19 09:42:03 +0100 (Mi, 19 Jan 2011) | 1 line Suppress trailing spaces in table paragraphs. ........ r88115 | georg.brandl | 2011-01-19 21:05:49 +0100 (Mi, 19 Jan 2011) | 1 line #10944: add c_bool to types table. ........ r88144 | georg.brandl | 2011-01-22 23:06:24 +0100 (Sa, 22 Jan 2011) | 1 line #10983: fix several bugs in the _tunnel implementation that seem to have missed while porting between branches. A unittest is needed! ........ r88165 | georg.brandl | 2011-01-24 20:53:18 +0100 (Mo, 24 Jan 2011) | 1 line Typo fix. ........ r88329 | georg.brandl | 2011-02-03 08:08:25 +0100 (Do, 03 Feb 2011) | 1 line Punctuation typos. ........ r88364 | georg.brandl | 2011-02-07 13:10:46 +0100 (Mo, 07 Feb 2011) | 1 line #11138: fix order of fill and align specifiers. ........ r88365 | georg.brandl | 2011-02-07 13:13:58 +0100 (Mo, 07 Feb 2011) | 1 line #8691: document that right alignment is default for numbers. ........ r88369 | georg.brandl | 2011-02-07 16:30:45 +0100 (Mo, 07 Feb 2011) | 1 line Consistent heading spacing, and fix two typos. ........ r88370 | georg.brandl | 2011-02-07 16:44:27 +0100 (Mo, 07 Feb 2011) | 1 line Spelling fixes. ........ r88423 | georg.brandl | 2011-02-15 13:41:17 +0100 (Di, 15 Feb 2011) | 1 line Apply logging SocketHandler doc update by Vinay. ........ r88424 | georg.brandl | 2011-02-15 13:44:43 +0100 (Di, 15 Feb 2011) | 1 line Remove editing slip. ........
| * Merged revisions 87136,87221,87256,87337-87338,87571,87839,88164 via ↵R. David Murray2011-02-112-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87136 | r.david.murray | 2010-12-08 17:53:00 -0500 (Wed, 08 Dec 2010) | 6 lines Have script_helper._assert_python strip refcount strings from stderr. This makes the output of the function and those that depend on it independent of whether or not they are being run under a debug build. ........ r87221 | r.david.murray | 2010-12-13 19:55:46 -0500 (Mon, 13 Dec 2010) | 4 lines #10699: fix docstring for tzset: it does not take a parameter Thanks to Garrett Cooper for the fix. ........ r87256 | r.david.murray | 2010-12-14 21:19:14 -0500 (Tue, 14 Dec 2010) | 2 lines #10705: document what the values of debuglevel are and mean. ........ r87337 | r.david.murray | 2010-12-17 11:11:40 -0500 (Fri, 17 Dec 2010) | 2 lines #10559: provide instructions for accessing sys.argv when first mentioned. ........ r87338 | r.david.murray | 2010-12-17 11:29:07 -0500 (Fri, 17 Dec 2010) | 2 lines #10454: clarify the compileall docs and help messages. [compileall.py changes not backported.] ........ r87571 | r.david.murray | 2010-12-29 14:06:48 -0500 (Wed, 29 Dec 2010) | 2 lines Fix same typo in docs. ........ r87839 | r.david.murray | 2011-01-07 16:57:25 -0500 (Fri, 07 Jan 2011) | 9 lines Fix formatting of values with embedded newlines when rfc2047 encoding Before this patch if a value being encoded had an embedded newline, the line following the newline would have no leading whitespace, and the whitespace it did have was encoded into the word. Now the existing whitespace gets turned into a blank, the way it does in other header reformatting, and the _continuation_ws gets added at the beginning of the encoded line. ........ r88164 | r.david.murray | 2011-01-24 14:34:58 -0500 (Mon, 24 Jan 2011) | 12 lines #10960: fix 'stat' links, link to lstat from stat, general tidy of stat doc. Original patch by Michal Nowikowski, with some additions and wording fixes by me. I changed the wording from 'Performs a stat system call' to 'Performs the equivalent of a stat system call', since on Windows there are no stat/lstat system calls involved. I also extended Michal's breakout of the attributes into a list to the other paragraphs, and rearranged the order of the paragraphs in the 'stat' docs to make it flow better and put it in what I think is a more logical/useful order. ........
| * Merged revisions 87873 via svnmerge fromR. David Murray2011-01-092-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87873 | r.david.murray | 2011-01-08 21:35:24 -0500 (Sat, 08 Jan 2011) | 12 lines #5871: protect against header injection attacks. This makes Header.encode throw a HeaderParseError if it winds up formatting a header such that a continuation line has no leading whitespace and looks like a header. Since Header accepts values containing newlines and preserves them (and this is by design), without this fix any program that took user input (say, a subject in a web form) and passed it to the email package as a header was vulnerable to header injection attacks. (As far as we know this has never been exploited.) Thanks to Jakub Wilk for reporting this vulnerability. ........
| * Merged revisions 87750 via svnmerge fromR. David Murray2011-01-052-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87750 | r.david.murray | 2011-01-04 20:39:32 -0500 (Tue, 04 Jan 2011) | 5 lines #10790: make append work when output codec is different from input codec There's still a bug here (the encode call shouldn't use the 'errors' paramter), but I'll fix that later. ........
| * Merged revisions 87567 via svnmerge fromR. David Murray2010-12-291-2/+2
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87567 | r.david.murray | 2010-12-29 11:57:24 -0500 (Wed, 29 Dec 2010) | 2 lines Fix a comment typo and update another comment to match Python3 reality ........
| * Merged revisions 87415 via svnmerge fromR. David Murray2010-12-212-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87415 | r.david.murray | 2010-12-21 13:07:59 -0500 (Tue, 21 Dec 2010) | 4 lines Fix the change made for issue 1243654. Surprisingly, it turns out there was no test that exercised this code path. ........
| * Merged revisions 87217 via svnmerge fromR. David Murray2010-12-132-3/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87217 | r.david.murray | 2010-12-13 18:51:19 -0500 (Mon, 13 Dec 2010) | 5 lines #1078919: make add_header automatically do RFC2231 encoding when needed. Also document the use of three-tuples if control of the charset and language is desired. ........
| * Merged revisions 87191 via svnmerge fromR. David Murray2010-12-121-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87191 | r.david.murray | 2010-12-12 15:06:19 -0500 (Sun, 12 Dec 2010) | 6 lines #243654: only create a new MIME boundary if we don't already have one. The rearranged code should do exactly what the old code did, but the new code avoids a potentially costly re computation in the case where a boundary already exists. ........
| * Merged revisions 85146 via svnmerge fromR. David Murray2010-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85146 | r.david.murray | 2010-10-01 16:38:33 -0400 (Fri, 01 Oct 2010) | 3 lines Fix docstring typo. ........
| * Merged revisions 85130 via svnmerge fromR. David Murray2010-12-061-5/+2
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85130 | r.david.murray | 2010-09-30 22:08:02 -0400 (Thu, 30 Sep 2010) | 2 lines Fix a couple spelling errors in comments and delete redundant __len__ def. ........
| * Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-31/+31
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
| * Merged revisions 85179 via svnmerge fromR. David Murray2010-10-022-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85179 | r.david.murray | 2010-10-02 11:58:26 -0400 (Sat, 02 Oct 2010) | 6 lines #1050268: make parseaddr 'quote' the contents of quoted strings in addresses. Also made the doc string for email._parseaddr's 'quote' function more accurate; I'd love to make the function match the old docstring instead, but other code uses it according the existing semantics. ........
| * Merged revisions 85142 via svnmerge fromR. David Murray2010-10-012-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85142 | r.david.murray | 2010-10-01 11:40:20 -0400 (Fri, 01 Oct 2010) | 5 lines #10004: in Q encoded word ignore '=xx' when xx is not valid hex. Bug report and fix by Thomas Guettler. ........
| * Merged revisions 84310 via svnmerge fromR. David Murray2010-08-252-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84310 | r.david.murray | 2010-08-24 20:45:55 -0400 (Tue, 24 Aug 2010) | 8 lines #1194222: make parsedate always return RFC2822 four character years. Two character years are now converted to four character years using the Posix standard rule (<68 == 2000, >=68==1900). This makes the parsed date RFC2822 compliant even if the input is not. Patch and test by Jeffrey Finkelstein. ........
| * Merged revisions 83690 via svnmerge fromR. David Murray2010-08-032-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83690 | r.david.murray | 2010-08-03 18:14:10 -0400 (Tue, 03 Aug 2010) | 10 lines #3196: if needed pad a short base64 encoded word before trying to decode. The RFCs encourage following Postel's law: be liberal in what you accept. So if someone forgot to pad the base64 encoded word payload to an even four bytes, we add the padding before handing it to base64mime.decode. Previously, missing padding resulted in a HeaderParseError. Patch by Jason Williams. ........