summaryrefslogtreecommitdiffstats
path: root/Doc/library/email.errors.rst
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] gh-101100: Fix sphinx warnings in `library/email.errors.rst` ↵Miss Islington (bot)2025-03-031-34/+55
| | | | | | | | (GH-130774) (#130781) gh-101100: Fix sphinx warnings in `library/email.errors.rst` (GH-130774) (cherry picked from commit a105f990199f99a352efd481ac039604feceaab5) Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
* [3.13] gh-130433: Update documentation for `MultipartConversionError` ↵Miss Islington (bot)2025-02-261-10/+4
| | | | | | | (GH-130436) (GH-130565) (cherry picked from commit b536e371044f9e9b1b34cc8276a01e67550b5428) Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
* [3.13] gh-121650: Encode newlines in headers, and verify headers are sound ↵Miss Islington (bot)2024-08-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-122233) (#122484) gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) GH-GH- Encode header parts that contain newlines Per RFC 2047: > [...] these encoding schemes allow the > encoding of arbitrary octet values, mail readers that implement this > decoding should also ensure that display of the decoded data on the > recipient's terminal will not cause unwanted side-effects It seems that the "quoted-word" scheme is a valid way to include a newline character in a header value, just like we already allow undecodable bytes or control characters. They do need to be properly quoted when serialized to text, though. GH-GH- Verify that email headers are well-formed This should fail for custom fold() implementations that aren't careful about newlines. (cherry picked from commit 097633981879b3c9de9a1dd120d3aa585ecc2384) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Bas Bloemsaat <bas@bloemsaat.org> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] docs: module page titles should not start with a link to themselves ↵Miss Islington (bot)2024-05-081-2/+2
| | | | | | | | (GH-117099) (#118790) docs: module page titles should not start with a link to themselves (GH-117099) (cherry picked from commit bcb435ee8ff41b5ec5d879ee0b6651f146a66151) Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
* gh-101100: Fix Sphinx reference warnings (GH-112416)Hugo van Kemenade2023-11-251-0/+9
| | | | | | | | | | | | | | | | | | | | | | | * Fix Sphinx warning in library/xml.rst Direct use of the pyexpat module is deprecated, but this is how to check the version for security purposes * Fix Sphinx warning in library/importlib.resources.rst * Use italics for parameters * Link to the exception * Fix Sphinx warning in library/gzip.rst * Document message and header defect base classes to fix Sphinx warning in library/email.headerregistry.rst * Restore feed_eof() doc to fix Sphinx warning in library/asyncio-stream.rst * Fix Sphinx warning in extending/newtypes.rst * Fix Sphinx warning in c-api/set.rst On stdtypes.rst, set and frozenset are documented together and the frozenset has the working refs
* [doc]: Spotted errors while working on rstlint. (GH-30879)Julien Palard2022-01-271-1/+1
| | | | Also ignored some `make suspicious` false positives while assuring true positives were properly seen by rstlint.
* 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