[Python-checkins] cpython (merge 3.2 -> 3.2): merge heads
benjamin.peterson
python-checkins at python.org
Fri Jul 15 21:07:05 CEST 2011
http://hg.python.org/cpython/rev/13fbfe6308e2
changeset: 71352:13fbfe6308e2
branch: 3.2
parent: 71349:8d05f697acd4
parent: 71347:1ae0b7b8de0b
user: Benjamin Peterson <benjamin at python.org>
date: Fri Jul 15 14:11:23 2011 -0500
summary:
merge heads
files:
Lib/test/test_concurrent_futures.py | 22 ++++++++++------
Misc/NEWS | 3 ++
Modules/_pickle.c | 2 +
3 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/Lib/test/test_concurrent_futures.py b/Lib/test/test_concurrent_futures.py
--- a/Lib/test/test_concurrent_futures.py
+++ b/Lib/test/test_concurrent_futures.py
@@ -598,16 +598,20 @@
self.assertTrue(isinstance(f1.exception(timeout=5), IOError))
+ at test.support.reap_threads
def test_main():
- test.support.run_unittest(ProcessPoolExecutorTest,
- ThreadPoolExecutorTest,
- ProcessPoolWaitTests,
- ThreadPoolWaitTests,
- ProcessPoolAsCompletedTests,
- ThreadPoolAsCompletedTests,
- FutureTests,
- ProcessPoolShutdownTest,
- ThreadPoolShutdownTest)
+ try:
+ test.support.run_unittest(ProcessPoolExecutorTest,
+ ThreadPoolExecutorTest,
+ ProcessPoolWaitTests,
+ ThreadPoolWaitTests,
+ ProcessPoolAsCompletedTests,
+ ThreadPoolAsCompletedTests,
+ FutureTests,
+ ProcessPoolShutdownTest,
+ ThreadPoolShutdownTest)
+ finally:
+ test.support.reap_children()
if __name__ == "__main__":
test_main()
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -30,6 +30,9 @@
Library
-------
+- Issue #11321: Fix a crash with multiple imports of the _pickle module when
+ embedding Python. Patch by Andreas Stührk.
+
- Issue #12502: asyncore: fix polling loop with AF_UNIX sockets.
- Issue #4376: ctypes now supports nested structures in a endian different than
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -6321,8 +6321,10 @@
if (m == NULL)
return NULL;
+ Py_INCREF(&Pickler_Type);
if (PyModule_AddObject(m, "Pickler", (PyObject *)&Pickler_Type) < 0)
return NULL;
+ Py_INCREF(&Unpickler_Type);
if (PyModule_AddObject(m, "Unpickler", (PyObject *)&Unpickler_Type) < 0)
return NULL;
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list