R. David Murray [Mon, 14 Dec 2009 16:28:26 +0000 (16:28 +0000)]
Issue #1680159: unicode coercion during an 'in' operation was masking
any errors that might occur during coercion of the left operand and
turning them into a TypeError with a message text that was confusing in
the given context. This patch lets any errors through, as was already
done during coercion of the right hand side.
Lars Gustäbel [Sun, 13 Dec 2009 11:32:27 +0000 (11:32 +0000)]
Issue #7357: No longer suppress fatal extraction errors by
default.
TarFile's errorlevel argument controls how errors are
handled that occur during extraction. There are three
possible levels 0, 1 and 2. If errorlevel is set to 1 or 2
fatal errors (e.g. a full filesystem) are raised as
exceptions. If it is set to 0, which is the default value,
extraction errors are suppressed, and error messages are
written to the debug log instead. But, if the debug log is
not activated, which is the default as well, all these
errors go unnoticed.
The original intention was to imitate GNU tar which tries
to extract as many members as possible instead of stopping
on the first error. It turns out that this is no good
default behaviour for a tar library. This patch simply
changes the default value for the errorlevel argument from
0 to 1, so that fatal extraction errors are raised as
EnvironmentError exceptions.
Mark Dickinson [Thu, 10 Dec 2009 10:36:32 +0000 (10:36 +0000)]
Replace the size check for PyMem_MALLOC and PyMem_REALLOC with an almost
equivalent[*] check that doesn't produce compiler warnings about a 'x < 0'
check on an unsigned type.
[*] it's equivalent for inputs of type size_t or Py_ssize_t, or any smaller
unsigned or signed integer type.
Ronald Oussoren [Thu, 10 Dec 2009 10:27:09 +0000 (10:27 +0000)]
Fix an issue with the detection of a non-existing SDK
on OSX. Without this patch it wasn't possible after all
to compile extensions on OSX 10.6 with the binary
installer unless the user had installed the (non-default)
10.4u SDK.
R. David Murray [Wed, 9 Dec 2009 15:15:31 +0000 (15:15 +0000)]
Issue 5949: fixed IMAP4_SSL hang when the IMAP server response is
missing proper end-of-line termination. Patch and tests by
Scott Dial. The new tests include a test harness which will
make it easier to add additional tests.
Ronald Oussoren [Tue, 8 Dec 2009 16:32:52 +0000 (16:32 +0000)]
Fix for issue 7452: HAVE_GCC_ASM_FOR_X87 gets set when doing a universal build on
an i386 based machine, but should only be active when compiling the x86 part of
the universal binary.
R. David Murray [Thu, 3 Dec 2009 23:57:59 +0000 (23:57 +0000)]
Issue 7431: use TESTFN in test_linecache instead of trying to create a
file in the Lib/test directory, which might be read-only for the
user running the tests.
Antoine Pitrou [Wed, 2 Dec 2009 20:37:54 +0000 (20:37 +0000)]
Issue #7333: The `posix` module gains an `initgroups()` function providing
access to the initgroups(3) C library call on Unix systems which implement
it. Patch by Jean-Paul Calderone.
Ronald Oussoren [Tue, 1 Dec 2009 15:54:01 +0000 (15:54 +0000)]
Fix for issue #7416: SIZEOF_UINTPTR_T can be invalid when configuring a
multi-architecture build (in particular when the architectures don't share
a common pointer size).
Fixed the same issue for SIZEOF_PTHREAD_T.
(No update to the NEWS file because this is a bugfix for an as yet unreleased
feature)
Mark Dickinson [Sat, 28 Nov 2009 16:32:27 +0000 (16:32 +0000)]
Issue #1678380: When distinguishing between -0.0 and 0.0 in
compiler_add_o, use copysign instead of examining the first and last
bytes of the double. The latter method fails for little-endian
ARM, OABI, where doubles are little-endian but with the words swapped.
Mark Dickinson [Sat, 28 Nov 2009 12:30:36 +0000 (12:30 +0000)]
Include ieeefp.h (when available) in pyport.h instead of individually in
Objects/floatobject.c and Objects/complexobject.c. This should silence
compiler warnings about implicit declaration of the 'finite' function
on Solaris.
Mark Dickinson [Sat, 28 Nov 2009 10:44:20 +0000 (10:44 +0000)]
Issue #7272, continued: don't re-use existing HAVE_BROKEN_POSIX_SEMAPHORES
to indicate that semaphores aren't available; define a new variable
POSIX_SEMAPHORES_NOT_ENABLED instead.
Antoine Pitrou [Fri, 27 Nov 2009 13:18:34 +0000 (13:18 +0000)]
Issue #6845: Add restart support for binary upload in ftplib. The
`storbinary()` method of FTP and FTP_TLS objects gains an optional `rest`
argument. Patch by Pablo Mouzo.
(note: the patch also adds a test for the rest argument in retrbinary())
Antoine Pitrou [Wed, 25 Nov 2009 22:59:36 +0000 (22:59 +0000)]
Issue #5788: `datetime.timedelta` objects get a new `total_seconds()` method returning
the total number of seconds in the duration. Patch by Brian Quinlan.