Although this patch contains API changes and is rather weighty for an
RC phase, the mailbox module was essentially unusable without the patch
since it would produce UnicodeErrors when handling non-ascii input
at arbitrary and somewhat mysterious places, and any non-trivial amount
of email processing will encounter messages with non-ascii bytes.
The release manager approved the patch application.
The changes allow binary input, and reject non-ASCII string input early
with a useful message instead of failing mysteriously later. Binary
is used internally for reading and writing the mailbox files. StringIO
and Text file input are deprecated.
Initial patch by Victor Stinner, validated and expanded by R. David Murray.
keyword-only argument. The preceding positional argument was deprecated,
so it made no sense to add filter as a positional argument.
(Patch reviewed by Brian Curtin and Anthony Long.)
(Reviewed by Georg Brandl.)
Also made similar changes to deque.reverse() though this wasn't
strictly necessary (the edge case cannot occur with two pointers
moving to meet in the middle). Making the change in reverse()
was more a matter of future-proofing.
function set. Otherwise a Python fatal error about hitting an unrecoverable
recursion depth gets triggered.
Closes issue #10985. Code review by Georg Brandl.
headers with iso-8859-1 (latin1) encoding. It was already doing that for
incoming headers which makes this behaviour now consistent in both incoming and
outgoing direction.
length and a non-zero offset, and an attempt to read past the end of file
is made (IndexError is raised instead). Patch by Ross Lagerwall.
Requested by Georg.