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.
Issue 7128: Removed reference to the non-existent copyreg module.
The reference to copyreg was a unnoticed leftover from the compatibility
support for the grand renaming of the standard library in Python 3. The
compatibility support was reverted in r63493, but not completely as this
patch shows.
Mark Dickinson [Mon, 23 Nov 2009 20:54:09 +0000 (20:54 +0000)]
Issue #7117, continued: Remove substitution of %g-style formatting for
%f-style formatting, which used to occur at high precision. Float formatting
should now be consistent between 2.7 and 3.1.
Lars Gustäbel [Sun, 22 Nov 2009 18:30:53 +0000 (18:30 +0000)]
Issue #6123: Fix opening empty archives and files.
(Note that an empty archive is not the same as an empty file. An
empty archive contains no members and is correctly terminated with an
EOF block full of zeros. An empty file contains no data at all.)
The problem was that although tarfile was able to create empty
archives, it failed to open them raising a ReadError. On the other
hand, tarfile opened empty files without error in most read modes and
presented them as empty archives. (However, some modes still raised
errors: "r|gz" raised ReadError, but "r:gz" worked, "r:bz2" even
raised EOFError.)
In order to get a more fine-grained control over the various internal
error conditions I now split up the HeaderError exception into a
number of meaningful sub-exceptions. This makes it easier in the
TarFile.next() method to react to the different conditions in the
correct way.
The visible change in its behaviour now is that tarfile will open
empty archives correctly and raise ReadError consistently for empty
files.
Jesse Noller [Sat, 21 Nov 2009 14:01:56 +0000 (14:01 +0000)]
issue5738: The distribution example was confusing, and out of date. It's too large to include inline in the docs as well. It belongs in an addons module outside the stdlib. Removing.
Mark Dickinson [Fri, 20 Nov 2009 19:30:22 +0000 (19:30 +0000)]
Issue #7272: Add configure test to detect whether sem_open works
properly, and use this to skip test_multiprocessing on platforms
where sem_open raises a signal. This should fix some FreeBSD buildbot
failures for test_multiprocessing.
improve several corner cases related with argument names in parenthesis
- Fix #7362: give a good error message for parenthesized arguments with
defaults.
- Add a py3k warning for any parenthesized arguments since those are not allowed
in Py3. This warning is not given in tuple unpacking, since that incurs the
tuple unpacking warning.
Ronald Oussoren [Thu, 19 Nov 2009 16:25:21 +0000 (16:25 +0000)]
Fix for issue #7085
On MacOSX 10.6 the CoreFoundation framework must be initialized on the main
thread, the constructor function in that framework will cause an SIGABRT when
it is called on any other thread.
Because a number of extension link (indirectly) to CoreFoundation and the
Python core itself didn't the interpreter crashed when importing some
extensions, such as _locale, on a secondary thread.
This fix ensures that Python is linked to CoreFoundation on OSX, which results
in the CoreFoundation constructor being called when Python is loaded. This
does not require code changes.