cpython: 8609d7fcdcc7 (original) (raw)

Mercurial > cpython

changeset 76066:8609d7fcdcc7 2.7

prevent writing to stderr from messing up the exception state (closes #14474) [#14474]

Benjamin Peterson benjamin@python.org
date Mon, 02 Apr 2012 11:15:17 -0400
parents d3a82a26c705
children d552016fc07c
files Lib/test/test_thread.py Misc/NEWS Modules/threadmodule.c
diffstat 3 files changed, 30 insertions(+), 0 deletions(-)[+] [-] Lib/test/test_thread.py 24 Misc/NEWS 3 Modules/threadmodule.c 3

line wrap: on

line diff

--- a/Lib/test/test_thread.py +++ b/Lib/test/test_thread.py @@ -130,6 +130,30 @@ class ThreadRunningTests(BasicThreadTest time.sleep(0.01) self.assertEqual(thread._count(), orig)

+ class Barrier: def init(self, num_threads):

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -9,6 +9,9 @@ What's New in Python 2.7.4 Core and Builtins ----------------- +- Issue #14474: Save and restore exception state in thread.start_new_thread()

--- a/Modules/threadmodule.c +++ b/Modules/threadmodule.c @@ -618,6 +618,8 @@ t_bootstrap(void *boot_raw) PyErr_Clear(); else { PyObject *file;

@@ -625,6 +627,7 @@ t_bootstrap(void *boot_raw) PyFile_WriteObject(boot->func, file, 0); else PyObject_Print(boot->func, stderr, 0);