summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_email
Commit message (Collapse)AuthorAgeFilesLines
* bpo-35317: Fix mktime() error in test_email (GH-10721)Victor Stinner2018-11-271-0/+2
| | | | | Fix mktime() overflow error in test_email: run test_localtime_daylight_true_dst_true() and test_localtime_daylight_false_dst_true() with a specific timezone.
* bpo-33476: Fix _header_value_parser when address group is missing final ';' ↵Dong-hee Na2018-07-281-0/+25
| | | | (GH-7484)
* bpo-27397: Make email module properly handle invalid-length base64 strings ↵Tal Einat2018-06-123-0/+32
| | | | | | | (#7583) When attempting to base64-decode a payload of invalid length (1 mod 4), properly recognize and handle it. The given data will be returned as-is, i.e. not decoded, along with a new defect, InvalidBase64LengthDefect.
* bpo-27931: Fix email address header parsing error (#5329)jayyyin2018-01-291-0/+17
| | | | Correctly handle addresses whose username is an empty quoted string.
* bpo-27240 Rewrite the email header folding algorithm. (#3488)R. David Murray2017-12-033-117/+216
| | | | | | | | | | | | | | | | | | | | | The original algorithm tried to delegate the folding to the tokens so that those tokens whose folding rules differed could specify the differences. However, this resulted in a lot of duplicated code because most of the rules were the same. The new algorithm moves all folding logic into a set of functions external to the token classes, but puts the information about which tokens can be folded in which ways on the tokens...with the exception of mime-parameters, which are a special case (which was not even implemented in the old folder). This algorithm can still probably be improved and hopefully simplified somewhat. Note that some of the test expectations are changed. I believe the changes are toward more desirable and consistent behavior: in general when (re) folding a line the canonical version of the tokens is generated, rather than preserving errors or extra whitespace.
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-4/+1
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* bpo-30532: Fix whitespace folding in certain casesJoel Hillacre2017-06-261-0/+12
| | | Leading whitespace was incorrectly dropped during folding of certain lines in the _header_value_parser's folding algorithm. This makes the whitespace handling code consistent.
* [email] bpo-29478: Fix passing max_line_length=None from Compat32 policy ↵mircea-cosbuc2017-06-121-0/+7
| | | | | | (GH-595) If max_line_length=None is specified while using the Compat32 policy, it is no longer ignored.
* Merge #28407 Improve test coverage of make_msgid.R David Murray2016-12-181-0/+12
|\
| * #28407 Improve test coverage of make_msgid.R David Murray2016-12-181-0/+12
| | | | | | | | Patch by Dillon Brock.
| * #19003: Only replace \r and/or \n line endings in email.generator.R David Murray2016-09-111-0/+12
| | | | | | | | | | This is a further restoration of backward compatibility, as well as being correct per the RFCs.
* | Merge: #19003: Only replace \r and/or \n line endings in email.generator.R David Murray2016-09-111-0/+12
| |
* | #20476: Deal with the message_factory circular import differently.R David Murray2016-09-101-1/+1
| | | | | | | | | | | | | | It turns out we can't depend on email.message getting imported every place message_factory is needed, so to avoid a circular import we need to special case Policy.message_factory=None in the parser instead of using monkey patching. I had a feeling that was a bad idea when I did it.
* | #20476: add a message_factory policy attribute to email.R David Murray2016-09-092-46/+87
| |
* | Merge with 3.5Steve Dower2016-09-092-3/+32
|\ \ | |/
| * #28047: Fix calculation of base64 line length.R David Murray2016-09-092-3/+32
| | | | | | | | | | This is buggy in the old email code as well, but it doesn't affect anything there because only the default line length is ever used there.
* | #27364: fix "incorrect" uses of escape character in the stdlib.R David Murray2016-09-082-3/+3
| | | | | | | | | | | | | | And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter.
* | Issue #27445: Merge from 3.5Berker Peksag2016-09-081-1/+4
|\ \ | |/
| * Issue #27445: Don't pass str(_charset) to MIMEText.set_payload()Berker Peksag2016-09-081-1/+4
| | | | | | | | Patch by Claude Paroz.
| * Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Martin Panter2016-09-071-2/+2
| |
* | #24277: The new email API is no longer provisional.R David Murray2016-09-081-0/+20
| | | | | | | | | | | | | | This is a wholesale reorganization and editing of the email documentation to make the new API the standard one, and the old API the 'legacy' one. The default is still the compat32 policy, for backward compatibility. We will change that eventually.
* | Merge: #22233: Only split headers on \r and/or \n, per email RFCs.R David Murray2016-09-072-2/+45
|\ \ | |/
| * #22233: Only split headers on \r and/or \n, per email RFCs.R David Murray2016-09-072-2/+45
| | | | | | | | Original patch by Martin Panter, new policy fixes by me.
* | #27331: add policy keyword argument to all MIME subclasses.R David Murray2016-09-071-0/+41
| | | | | | | | Patch by Berker Peksag.
* | Merge: 27988: Make sure iter_attachments does not mutate the payload list.R David Murray2016-09-071-0/+10
|\ \ | |/
| * 27988: Make sure iter_attachments does not mutate the payload list.R David Murray2016-09-071-0/+10
| |
* | Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Raymond Hettinger2016-08-302-3/+3
| |
* | Merge ISO-8859 fixes from 3.5Martin Panter2016-08-101-2/+2
|\ \ | |/
| * Correct misspellings of ISO-8859Martin Panter2016-08-101-2/+2
| |
* | Issue #27171: Merge typo fixes from 3.5Martin Panter2016-06-021-1/+1
|\ \ | |/
| * Issue #27171: Fix typos in documentation, comments, and test function namesMartin Panter2016-06-021-1/+1
| |
* | Issue #27076: Merge spelling from 3.5Martin Panter2016-05-262-2/+2
|\ \ | |/
| * Issue #27076: Doc, comment and tests spelling fixesMartin Panter2016-05-262-2/+2
| | | | | | | | Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
* | Merge with 3.5Terry Jan Reedy2016-05-062-12/+9
|\ \ | |/
| * Issue 26912: fix broken imports in test_email package.Terry Jan Reedy2016-05-062-12/+9
| |
* | Issue #23277: Remove unused imports in tests.Serhiy Storchaka2016-04-242-2/+0
| |
* | Issue #23277: Remove unused support.run_unittest import.Serhiy Storchaka2016-04-241-1/+0
| |
* | Issue #23277: Remove unused sys and os importsBerker Peksag2016-04-241-1/+0
|/ | | | Patch by Jon Dufresne.
* Issue #6598: Avoid clock wrapping around in test_make_msgid_collisions.Serhiy Storchaka2015-11-101-1/+1
|\ | | | | | | Use time.monotonic instead of time.clock.
| * Issue #6598: Avoid clock wrapping around in test_make_msgid_collisions.Serhiy Storchaka2015-11-101-1/+4
| | | | | | | | Use time.monotonic or time.time instead of time.clock.
* | Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5Martin Panter2015-11-021-1/+1
|\ \ | |/
| * Issue #25523: Correct "a" article to "an" articleMartin Panter2015-11-021-1/+1
| | | | | | | | | | | | This changes the main documentation, doc strings, source code comments, and a couple error messages in the test suite. In some cases the word was removed or edited some other way to fix the grammar.
* | Merge 3.4 (test_email)Victor Stinner2015-09-181-0/+3
|\ \ | |/
| * Issue #24836: Skip FormatDateTests of test_email.test_utils on Mac OS X SnowVictor Stinner2015-09-181-0/+3
| | | | | | | | Leopard because this OS uses out of date (pre 2011k) timezone files.
* | Issue #22932: Fix timezones in email.utils.formatdate.Robert Collins2015-07-311-0/+20
|\ \ | |/ | | | | Patch from Dmitry Shachnev.
| * Issue #22932: Fix timezones in email.utils.formatdate.Robert Collins2015-07-311-0/+20
| | | | | | | | Patch from Dmitry Shachnev.
* | Issue #6598: Increased time precision and random number range inSerhiy Storchaka2015-05-191-1/+24
|\ \ | |/ | | | | email.utils.make_msgid() to strengthen the uniqueness of the message ID.
| * Issue #6598: Increased time precision and random number range inSerhiy Storchaka2015-05-191-1/+24
| | | | | | | | email.utils.make_msgid() to strengthen the uniqueness of the message ID.
* | #20098: add mangle_from_ policy option.R David Murray2015-05-172-0/+24
| | | | | | | | | | | | | | This defaults to True in the compat32 policy for backward compatibility, but to False for all new policies. Patch by Milan Oberkirch, with a few tweaks.
* | #24211: Add RFC6532 support to the email library.R David Murray2015-05-172-0/+26
| | | | | | | | | | | | | | | | | | This could use more edge case tests, but the basic functionality is tested. (Note that this changeset does not add tailored support for the RFC 6532 message/global MIME type, but the email package generic facilities will handle it.) Reviewed by Maciej Szulik.