Antoine Pitrou [Wed, 21 Apr 2010 22:53:29 +0000 (22:53 +0000)]
Issue #7332: Remove the 16KB stack-based buffer in
PyMarshal_ReadLastObjectFromFile, which doesn't bring any noticeable
benefit compared to the dynamic memory allocation fallback. Patch by
Charles-François Natali.
Antoine Pitrou [Wed, 21 Apr 2010 19:28:03 +0000 (19:28 +0000)]
Issue #8484: Load all ciphers and digest algorithms when initializing
the _ssl extension, such that verification of some SSL certificates
doesn't fail because of an "unknown algorithm".
Stefan Krah [Tue, 20 Apr 2010 07:59:10 +0000 (07:59 +0000)]
1) The timeout in the itimer tests was too low for slow or heavily
loaded machines.
2) Even with the increased timeout, the OS does not guarantee that
a process will get a certain amount of virtual time in 60s, so
the failure is changed to a diagnostic.
Victor Stinner [Sun, 18 Apr 2010 09:07:49 +0000 (09:07 +0000)]
platform: use subprocess.Popen() instead of os.popen() in _syscmd_file()
* Popen() avoids ugly shell escape: target.replace('"', '\\"')
* Use proc.communicate() instead of f.stdout.read()
* Get output from stdout by splitting with ": " instead of splitting by spaces
to support filename with spaces
R. David Murray [Sat, 17 Apr 2010 05:26:26 +0000 (05:26 +0000)]
Issue #3864: Skip three test_signal tests on freebsd6 due to platform bug.
Two itimer tests and an interprocess signal test fail on FreeBSD 6 if
any test that starts a thread runs before test_signal. Since FreeBSD7
does not show this behavior, the bug is most likely a platform bug,
so this patch just skips the failing tests on freebsd6.
Brian Curtin [Thu, 15 Apr 2010 00:40:40 +0000 (00:40 +0000)]
Fix os.kill tests to be more robust and work with slower machines.
Rather than depending on some sleep value, start up an interpreter
as a subprocess and communicate with it. Because subprocess pipes
can't be read from until EOF and I want to read from them before that,
use ctypes to peek by using PeekNamedPipe. Once the subprocess has
written the message, then it is ready to roll and accept signals.
After that, kill it.
Brian Curtin [Wed, 14 Apr 2010 02:24:24 +0000 (02:24 +0000)]
Add a small sleep to let a subprocess start before terminating it.
David Bolen's buildbot isn't know for it's speed, and it seems that we
may have been trying to kill the subprocess before it was fully
initialized. I ran with this change on the bot itself and it seemed to work.
R. David Murray [Mon, 12 Apr 2010 16:35:19 +0000 (16:35 +0000)]
Issue #7585: use tab between components in unified and context diff headers.
Instead of spaces between the filename and date (or whatever the string
is that follows the filename, if any) use tabs. This is what the unix
'diff' command does, for example, and difflib was intended to follow
the 'standard' way of doing diffs. This improves compatibility with
patch tools. The docs and examples are also changed to recommended that
the date format used be the ISO 8601 format, which is what modern diff
tools emit by default.
R. David Murray [Mon, 12 Apr 2010 14:26:06 +0000 (14:26 +0000)]
Issue #7472: ISO-2022 charsets now consistently use 7bit CTE.
Fixed a typo in the email.encoders module so that messages output using
an ISO-2022 character set will use a content-transfer-encoding of
7bit consistently. Previously if the input data had any eight bit
characters the output data would get marked as 8bit even though it
was actually 7bit.
Antoine Pitrou [Mon, 12 Apr 2010 00:10:46 +0000 (00:10 +0000)]
It is possible to add extra testing options using EXTRATESTOPTS.
When such extra options include "-x testname", subsequent arguments
are all taken as test names to ignore. Therefore, standard options
must be passed before *TESTOPTS.
Stefan Krah [Sun, 11 Apr 2010 15:15:54 +0000 (15:15 +0000)]
Fix for issues #3581, #1481 and #7650:
1. The assumptions in check_node() were too restrictive:
- Hardware addresses with universal_local_bit=1 are valid
(locally administered).
- Many of the tested functions (including uuid.getnode())
may return valid RFC 4122 random node IDs. These are pretty
much random 48-bit values with the multicast bit set to 1.
2. _unixdll_getnode() calls _uuid_generate_time(), which may be None
on some platforms. The resulting TypeError is now caught.