Martin v. Löwis [Sat, 13 Dec 2008 14:42:53 +0000 (14:42 +0000)]
Backport of r66703:
Issue #3863: Disabled a unit test of fork being called from a thread
when running on platforms known to exhibit OS bugs when attempting that.
Jeffrey Yasskin [Wed, 10 Dec 2008 07:28:12 +0000 (07:28 +0000)]
Backported issue #4589 to Python 2.5.3: Propagated an exception thrown by a
context manager's __exit__ method's result while it's being converted to bool.
Issue #4176: Pickle would crash the interpreter when a __reduce__ function
does not return an iterator for the 4th and 5th items.
(sequence-like and mapping-like state)
- Issue #1204: The configure script now tests for additional libraries
that may be required when linking against readline. This fixes issues
with x86_64 builds on some platforms (a few Linux flavors and OpenBSD).
Backport of r66275/r66274 from trunk/py3k. This is the last bit of
the fix for issue 874900 to fix the use of the threading module in a
post-fork python process. A NEWS entry for this already exists with
the previous Lib/threading commit for this bug.
Thomas Heller [Tue, 19 Aug 2008 17:17:37 +0000 (17:17 +0000)]
issue #3554: ctypes.string_at and ctypes.wstring_at must use the
pythonapi calling convention so that the GIL is held and error return
values are checked.
Issue #2234: distutils failed with mingw binutils 2.18.50.20080109.
Be less strict when parsing these version numbers,
they don't necessarily follow the python numbering scheme.
Gregory P. Smith [Sun, 17 Aug 2008 23:06:19 +0000 (23:06 +0000)]
Backport of r64767 from trunk
Fixes Issue #3309: Fix bz2.BZFile iterator to release its internal lock
properly when raising an exception due to the bz2file being closed.
Prevents a deadlock.
Gregory P. Smith [Sun, 17 Aug 2008 23:01:11 +0000 (23:01 +0000)]
Backport of r65032 from trunk
Fixes Issue #874900: after an os.fork() call the threading module state is cleaned
up in the child process to prevent deadlock and report proper thread counts
if the new process uses the threading module.
- PC/VC6/_bsddb.dsp:
removed '/nodefaultlib:"msvcrt"' to fix linker error.
- PC/VC6/_msi.dsp:
added new module support.
- PC/VC6/_sqlite3.dsp:
/D "MODULE_NAME=\"sqlite3\""
caused extra leading space like
#define MODULE_NAME " sqlite3"
so uses
/D MODULE_NAME=\"sqlite3\"
instead.
- PC/VC6/python.dsp:
changed stack size to 2MB to avoid stack overflow on
some tests.
(backport of r61652 and r61665 from trunk)
Issue #1471: Arguments to fcntl.ioctl are no longer broken on 64-bit OpenBSD
and similar platforms due to sign extension.
(backport r65459 from trunk)
- Issue #1857: subprocess.Popen.poll gained an additional _deadstate keyword
argument in python 2.5, this broke code that subclassed Popen to include its
own poll method. Fixed my moving _deadstate to an _internal_poll method.
Issue #2620: Overflow checking when allocating or reallocating memory
was not always being done properly in some python types and extension
modules. PyMem_MALLOC, PyMem_REALLOC, PyMem_NEW and PyMem_RESIZE have
all been updated to perform better checks and places in the code that
would previously leak memory on the error path when such an allocation
failed have been fixed.
Backport r62627 + r62744 from trunk to fix issue 2632.
- Issue #2632: Prevent socket.read(bignumber) from over allocating memory
in the common case when the data is returned from the underlying socket
in increments much smaller than bignumber.
#Issue3088 in-progress: Race condition with instances of classes derived from threading.local:
When a thread touches such an object for the first time, a new thread-local __dict__ is created,
and the __init__ method is run.
But a thread switch can occur here; if the other thread touches the same object, it installs another
__dict__; when the first thread resumes, it updates the dictionary of the second...
This is the deep cause of the failures in test_multiprocessing involving "managers" objects.
Issue 3110: Crash with weakref subclass,
seen after a "import multiprocessing.reduction"
An instance of a weakref subclass can have attributes.
If such a weakref holds the only strong reference to the object,
deleting the weakref will delete the object. In this case,
the callback must not be called, because the ref object is being deleted!
- Issue #1686386: Tuple's tp_repr did not take into account the possibility of
having a self-referential tuple, which is possible from C code. Nor did
object's tp_str consider that a type's tp_str could do something that could
lead to an inifinite recursion. Py_ReprEnter() and Py_EnterRecursiveCall(),
respectively, fixed the issues. (Backport of r58288 from trunk to 2.5.)