Commit graph

8 commits

Author SHA1 Message Date
Serhiy Storchaka e91dee87ed
bpo-43323: Fix UnicodeEncodeError in the email module (GH-32137)
It was raised if the charset itself contains characters not encodable
in UTF-8 (in particular \udcxx characters representing non-decodable
bytes in the source).
2022-04-30 13:17:23 +03:00
Tal Einat c3f55be7dd
bpo-27397: Make email module properly handle invalid-length base64 strings (#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.
2018-06-12 15:46:22 +03:00
Serhiy Storchaka 3d42225e3d Fixed a type error introduced in issue #28992. 2016-12-21 14:08:55 +02:00
Serhiy Storchaka 8cbd3df3ce Issue #28992: Use bytes.fromhex(). 2016-12-21 12:59:28 +02:00
Serhiy Storchaka 9f8a8910a4 Escaped backslashes in docstrings. 2015-04-03 18:12:41 +03:00
Terry Jan Reedy 0f84764a09 Issue #17047: remove doubled words added in 3.3
as reported by Serhiy Storchaka and Matthew Barnett.
2013-03-11 18:34:00 -04:00
R David Murray 36432ea783 Add '__all__' to _encoded_words and mark QByteMap as private. 2012-05-27 12:39:54 -04:00
R David Murray 0b6f6c82b5 #12586: add provisional email policy with new header parsing and folding.
When the new policies are used (and only when the new policies are explicitly
used) headers turn into objects that have attributes based on their parsed
values, and can be set using objects that encapsulate the values, as well as
set directly from unicode strings.  The folding algorithm then takes care of
encoding unicode where needed, and folding according to the highest level
syntactic objects.

With this patch only date and time headers are parsed as anything other than
unstructured, but that is all the helper methods in the existing API handle.
I do plan to add more parsers, and complete the set specified in the RFC
before the package becomes stable.
2012-05-25 18:42:14 -04:00