diff options
author | Ned Deily <nad@acm.org> | 2014-11-02 02:26:45 (GMT) |
---|---|---|
committer | Ned Deily <nad@acm.org> | 2014-11-02 02:26:45 (GMT) |
commit | 33db23f53cd39b3e3f6b9b526601a85879abbcc5 (patch) | |
tree | a1b6e466c943e2789f5fdbfe9ed3bf6c8f540a72 | |
parent | 247b6441a0b496ae02a617d8c06f6ff3beff66f3 (diff) | |
download | cpython-33db23f53cd39b3e3f6b9b526601a85879abbcc5.zip cpython-33db23f53cd39b3e3f6b9b526601a85879abbcc5.tar.gz cpython-33db23f53cd39b3e3f6b9b526601a85879abbcc5.tar.bz2 |
Issue #22770: Prevent some Tk segfaults on OS X when running gui tests.
When running tests in subprocesses with the regrtest -j option, a bug
in Cocoa Tk can result in a Tcl segfault. Avoid the problem by forcing
Tk to fully initialize as an OS X gui process before destroying the
Tcl instance and creating another. (Original patch by Serhiy Storchaka)
-rw-r--r-- | Lib/test/test_support.py | 5 | ||||
-rw-r--r-- | Misc/NEWS | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index 26b8e44..f443459 100644 --- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -326,12 +326,11 @@ def _is_gui_available(): reason = "cannot run without OS X gui process" # check on every platform whether tkinter can actually do anything - # but skip the test on OS X because it can cause segfaults in Cocoa Tk - # when running regrtest with the -j option (multiple threads/subprocesses) - if (not reason) and (sys.platform != 'darwin'): + if not reason: try: from Tkinter import Tk root = Tk() + root.update() root.destroy() except Exception as e: err_string = str(e) @@ -277,6 +277,8 @@ Tests - Issue #21976: Fix test_ssl to accept LibreSSL version strings. Thanks to William Orr. +- Issue #22770: Prevent some Tk segfaults on OS X when running gui tests. + Build ----- |