summaryrefslogtreecommitdiffstats
path: root/Doc/library/email.errors.rst
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30681: Support invalid date format or value in email Date header (GH-22090)Georges Toth2020-10-271-0/+3
| | | | | | | | | | | | | | | | | | | | I am re-submitting an older PR which was abandoned but is still relevant, #10783 by @timb07. The issue being solved () is still relevant. The original PR #10783 was closed as the final request changes were not applied and since abandoned. In this new PR I have re-used the original patch plus applied both comments from the review, by @maxking and @pganssle. For reference, here is the original PR description: In email.utils.parsedate_to_datetime(), a failure to parse the date, or invalid date components (such as hour outside 0..23) raises an exception. Document this behaviour, and add tests to test_email/test_utils.py to confirm this behaviour. In email.headerregistry.DateHeader.parse(), check when parsedate_to_datetime() raises an exception and add a new defect InvalidDateDefect; preserve the invalid value as the string value of the header, but set the datetime attribute to None. Add tests to test_email/test_headerregistry.py to confirm this behaviour; also added test to test_email/test_inversion.py to confirm emails with such defective date headers round trip successfully. This pull request incorporates feedback gratefully received from @bitdancer, @brettcannon, @Mariatta and @warsaw, and replaces the earlier PR #2254. Automerge-Triggered-By: GH:warsaw
* bpo-38738: Fix formatting of True and False. (GH-17083)Serhiy Storchaka2019-11-121-1/+1
| | | | | | | | | * "Return true/false" is replaced with "Return ``True``/``False``" if the function actually returns a bool. * Fixed formatting of some True and False literals (now in monospace). * Replaced "True/False" with "true/false" if it can be not only bool. * Replaced some 1/0 with True/False if it corresponds the code. * "Returns <bool>" is replaced with "Return <bool>".
* bpo-27397: Make email module properly handle invalid-length base64 strings ↵Tal Einat2018-06-121-0/+4
| | | | | | | (#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.
* Fix typos in multiple `.rst` files (#1668)delirious-lettuce2017-05-191-2/+2
|
* #24277: The new email API is no longer provisional.R David Murray2016-09-081-22/+16
| | | | | | | 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.
* Issue #22558: Add remaining doc links to source code for Python-coded modules.Terry Jan Reedy2016-06-111-0/+3
| | | | | Reformat header above separator line (added if missing) to a common format. Patch by Yoni Lavi.
* Issue #18761: Improved cross-references in email documentation.Serhiy Storchaka2013-08-191-13/+16
|
* Fix a couple of versionadded/versionchanged related markup errors.Georg Brandl2012-06-241-2/+2
|
* #12515: email now registers a defect if the MIME end boundary is missing.R David Murray2012-05-281-0/+5
| | | | | | This commit also restores the news item for 167256 that it looks like Terry inadvertently deleted. (Either that, or I don't understand now merging works...which is equally possible.)
* #1672568: email now registers defects for base64 payload format errors.R David Murray2012-05-281-0/+7
| | | | | | | | | | | | | | | Which also means that it is now producing *something* for any base64 payload, which is what leads to the couple of older test changes in test_email. This is a slightly backward incompatible behavior change, but the new behavior is so much more useful than the old (you can now *reliably* detect errors, and any program that was detecting errors by sniffing for a base64 return from get_payload(decode=True) and then doing its own error-recovery decode will just get the error-recovery decode right away). So this seems to me to be worth the small risk inherent in this behavior change. This patch also refactors the defect tests into a separate test file, since they are no longer just parser tests.
* #14925: email now registers a defect for missing header/body separator.R David Murray2012-05-281-0/+9
| | | | | | | This patch also deprecates the MalformedHeaderDefect. My best guess is that this defect was rendered obsolete by a refactoring of the parser, and the corresponding defect for the new parser (which this patch introduces) was overlooked.
* #11785: fix the :mod: references in email package submodule titles.R David Murray2012-05-271-2/+2
| | | | Also adds the TOC entry for headerregistry.
* Terminology fix: exceptions are raised, except in generator.throw().Georg Brandl2010-08-031-1/+1
|
* Merged revisions 71572 via svnmerge fromGeorg Brandl2009-04-271-6/+7
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r71572 | georg.brandl | 2009-04-13 15:13:25 +0200 (Mo, 13 Apr 2009) | 1 line #5745: more linking for identifiers in email docs. ........
* Get rid of the remaining versionadded/versionchanged directives.Georg Brandl2007-09-011-3/+0
|
* Move the 3k reST doc tree in place.Georg Brandl2007-08-151-0/+91