]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Merge of the folding-reimpl-branch. Specific changes,
authorBarry Warsaw <barry@python.org>
Thu, 6 Mar 2003 05:39:46 +0000 (05:39 +0000)
committerBarry Warsaw <barry@python.org>
Thu, 6 Mar 2003 05:39:46 +0000 (05:39 +0000)
commite899e51c060067ee3ab8363b1845ed4ad41b38f7
tree1a5abc0bbac4ac4bd13f0d0c97f3a334117338f2
parent0e4570bcb0cc57f2854e3a43c65d29483442c4d2
Merge of the folding-reimpl-branch.  Specific changes,

_split(): New implementation of ASCII line splitting which should do a
better job and not be subject to the various weird artifacts (bugs)
reported.  This should also do a better job of higher-level syntactic
splits by trying first to split on semis, then commas, then
whitespace.

Use a Timbot-ly binary search for optimal non-ASCII split points for
better packing of header lines.  This also lets us remove one
recursion call.  Don't pass in firstline, but instead pass in the
actual line length we're shooting for.  Also pass in the list of split
characters.

encode(): Pass in the list of split characters so applications can
have some control over what "higher level syntactic breaks" are.

Also,

decode_header(): Transform binascii.Errors which can occur when
decoding a base64 RFC 2047 header with bogus data, into an
email.Errors.HeaderParseError.  Closes SF bug #696712.
Lib/email/Header.py