summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-07-15 19:10:59 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-07-15 19:10:59 (GMT)
commit1a41d7d51d34bac1f6d429d75ff517d609c2ef8f (patch)
tree72236a6962e367578cd0e95c674394c9bec05bb8
parente92cd0ce987d11acf2b93d43171f61c297e935ba (diff)
parent874d65afaef54993eb5779c31611f5f3baa995e2 (diff)
downloadcpython-1a41d7d51d34bac1f6d429d75ff517d609c2ef8f.zip
cpython-1a41d7d51d34bac1f6d429d75ff517d609c2ef8f.tar.gz
cpython-1a41d7d51d34bac1f6d429d75ff517d609c2ef8f.tar.bz2
merge heads
-rw-r--r--Doc/distutils/index.rst1
-rw-r--r--Doc/library/packaging.rst3
-rw-r--r--Lib/test/test_concurrent_futures.py22
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/_pickle.c2
5 files changed, 18 insertions, 13 deletions
diff --git a/Doc/distutils/index.rst b/Doc/distutils/index.rst
index b3a5231..c8dd9f4 100644
--- a/Doc/distutils/index.rst
+++ b/Doc/distutils/index.rst
@@ -20,7 +20,6 @@ very little overhead for build/release/install mechanics.
.. toctree::
:maxdepth: 2
- :numbered:
introduction.rst
setupscript.rst
diff --git a/Doc/library/packaging.rst b/Doc/library/packaging.rst
index 5bf2c06..c6bff47 100644
--- a/Doc/library/packaging.rst
+++ b/Doc/library/packaging.rst
@@ -23,7 +23,6 @@ Building blocks
.. toctree::
:maxdepth: 2
- :numbered:
packaging-misc
packaging.version
@@ -42,7 +41,6 @@ The command machinery
.. toctree::
:maxdepth: 2
- :numbered:
packaging.dist
packaging.command
@@ -55,7 +53,6 @@ Other utilities
.. toctree::
:maxdepth: 2
- :numbered:
packaging.util
packaging.tests.pypi_server
diff --git a/Lib/test/test_concurrent_futures.py b/Lib/test/test_concurrent_futures.py
index fda6f5b..222bd54 100644
--- a/Lib/test/test_concurrent_futures.py
+++ b/Lib/test/test_concurrent_futures.py
@@ -623,16 +623,20 @@ class FutureTests(unittest.TestCase):
self.assertTrue(isinstance(f1.exception(timeout=5), IOError))
+@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
index 93ae3ee..1565d72 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -228,6 +228,9 @@ Core and Builtins
Library
-------
+- Issue #11321: Fix a crash with multiple imports of the _pickle module when
+ embedding Python. Patch by Andreas Stührk.
+
- Issue #6755: Add get_wch() method to curses.window class. Patch by Iñigo
Serna.
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 822d03c..06bce1e 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -6338,8 +6338,10 @@ PyInit__pickle(void)
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;