R David Murray [Sat, 8 Feb 2014 22:54:56 +0000 (17:54 -0500)]
#14983: always add a line end after a MIME boundary marker.
This is more RFC compliant (see issue) and fixes a problem with
signature verifiers rejecting the part when signed. There is some
amount of backward compatibility concern here since it changes
the output, but the RFC issue coupled with fixing the problem
with signature verifiers seems worth the small risk of breaking
code that depends on the current incorrect output.
Antoine Pitrou [Sat, 8 Feb 2014 22:03:56 +0000 (23:03 +0100)]
Issue #20540: Fix a performance regression (vs. Python 3.2) when layering a multiprocessing Connection over a TCP socket.
For small payloads, Nagle's algorithm would introduce idle delays before the entire transmission of a message.
Antoine Pitrou [Sat, 8 Feb 2014 22:05:52 +0000 (23:05 +0100)]
Issue #20540: Fix a performance regression (vs. Python 3.2) when layering a multiprocessing Connection over a TCP socket.
For small payloads, Nagle's algorithm would introduce idle delays before the entire transmission of a message.
R David Murray [Sat, 8 Feb 2014 18:12:00 +0000 (13:12 -0500)]
#16983: Apply postel's law to encoded words inside quoted strings.
This applies only to the new parser. The old parser decodes encoded words
inside quoted strings already, although it gets the whitespace wrong
when it does so.
This version of the patch only handles the most common case (a single encoded
word surrounded by quotes), but I haven't seen any other variations of this in
the wild yet, so its good enough for now.
R David Murray [Sat, 8 Feb 2014 16:48:20 +0000 (11:48 -0500)]
#19772: Do not mutate message when downcoding to 7bit.
This is a bit of an ugly hack because of the way generator pieces together the
output message. The deepcopys aren't too expensive, though, because we know it
is only called on messages that are not multiparts, and the payload (the thing
that could be large) is an immutable object.
Test and preliminary work on patch by Vajrasky Kok.
Nick Coghlan [Sat, 8 Feb 2014 09:44:16 +0000 (19:44 +1000)]
Issue #20478: avoid special casing Counter in statistics
Passing Counter objects to the Counter constructor is
special cased, going through iter() firsts ensures they
are handled the same way as any other iterable.
(Committing on Steven's behalf as I don't believe his
SSH key is registered yet)
R David Murray [Fri, 7 Feb 2014 18:47:40 +0000 (13:47 -0500)]
#20013: don't raise socket error when selected mailbox deleted.
I'm checking this in without a test because not much of this code
is tested and I don't have time to work up the necessary extensions
to the existing test framework.
The patch itself was tested by the person who reported the bug.
R David Murray [Fri, 7 Feb 2014 18:44:57 +0000 (13:44 -0500)]
#20013: don't raise socket error when selected mailbox deleted.
I'm checking this in without a test because not much of this code
is tested and I don't have time to work up the necessary extensions
to the existing test framework.
The patch itself was tested by the person who reported the bug.
Brett Cannon [Thu, 6 Feb 2014 14:22:51 +0000 (09:22 -0500)]
Issue #6386: When executing a script that's a symlink, the directory
where the symlink resolves to is added to sys.path, not the directory
containing the symlink itself.
Thanks to Sanko Resic for an initial attempt at the patch.
Ronald Oussoren [Thu, 6 Feb 2014 10:19:18 +0000 (11:19 +0100)]
Issue #14455: fix handling of unsigned long long values for binary plist files
Values in the range of an unsigned long long, but outside of the range
of a signed long long were serialized as a negative value.
Due to a bug in PyObjC my test scripts indicated that the previous behavior
matched Apple's plist code, instead the handle large unsigned values correctly.
The change to plistlib.py is from a patch by Serhiy.
Issue #19920: TarFile.list() no longer fails when outputs a listing
containing non-encodable characters. Added tests for TarFile.list().
Based on patch by Vajrasky Kok.
Issue #19920: TarFile.list() no longer fails when outputs a listing
containing non-encodable characters. Added tests for TarFile.list().
Based on patch by Vajrasky Kok.