[issue18604] Consolidate gui available checks in test.support

2014-11-01 Thread Ned Deily

Ned Deily added the comment:

The previous segfaults on OS X have been isolated to a problem in Cocoa Tk and 
an issue has been opened about it on the Tk issue tracker.  See Issue22770 for 
details.  Changesets applied to _is_gui_available() in that issue should 
prevent the segfaults by ensuring that Tk completes necessary initialization 
before the Tcl interpreter instance is destroyed and a new one created.  So 
_is_gui_available() is now enabled on OS X and we can close this issue.

--
resolution:  - fixed
stage:  - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18604
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18604] Consolidate gui available checks in test.support

2014-11-01 Thread Zachary Ware

Zachary Ware added the comment:

Thanks for tracking it down, Ned!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18604
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18604] Consolidate gui available checks in test.support

2014-07-01 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


--
assignee: zach.ware - ned.deily
resolution: fixed - 

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18604
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18604] Consolidate gui available checks in test.support

2014-05-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fef11a65a5e5 by Ned Deily in branch '2.7':
Issue #18604: Skip the Tk instantiation test on OS X because it can
http://hg.python.org/cpython/rev/fef11a65a5e5

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18604
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18604] Consolidate gui available checks in test.support

2014-05-23 Thread Ned Deily

Ned Deily added the comment:

Earlier I noted: Somewhat surprisingly, the segfault doesn't seem to happen 
under the same conditions with 2.7.  I'm not sure now how I came to that 
conclusion then but it is incorrect: the segfault definitely also occurs under 
the same conditions with 2.7, at least when using the current ActiveTcl 8.5.15. 
 It did not seem to fail with the Apple system Tk 8.5.9, a more plausible 
result than not failing at all with 2.7.  Next step: test with various Cocoa Tk 
versions.

--
stage: resolved - 

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18604
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18604] Consolidate gui available checks in test.support

2014-05-05 Thread Zachary Ware

Zachary Ware added the comment:

Thanks Ned.  Unfortunately, I don't have a Mac to test on, so I can't help much 
with figuring out what's going on.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18604
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18604] Consolidate gui available checks in test.support

2014-05-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7ecb6e4b1077 by Ned Deily in branch '3.4':
Issue #18604: Skip the Tk instantiation test on OS X because it can
http://hg.python.org/cpython/rev/7ecb6e4b1077

New changeset 7f6d9990a9b1 by Ned Deily in branch 'default':
Issue #18604: merge from 3.4
http://hg.python.org/cpython/rev/7f6d9990a9b1

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18604
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18604] Consolidate gui available checks in test.support

2014-05-03 Thread Ned Deily

Ned Deily added the comment:

For some reason, the newly-added Tk instantiation check causes the OS X Cocoa 
Tk to segfault when tests are run under regrtest -jn option, which causes each 
test to be run under a separate subprocess called from a separate thread.  
Somewhat surprisingly, the segfault doesn't seem to happen under the same 
conditions with 2.7, only with 3.4 and default, so there is something more at 
play here.  But with the imminent tagging of 3.4.1rc1, I think it is better to 
disable the check for 3.4 (and default) on OS X pending further investigation.  
The check is redundant: if Tk doesn't work for some reason, the individual test 
should fail anyway, just a bit later.

--
nosy: +ned.deily
status: closed - open
versions: +Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18604
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18604] Consolidate gui available checks in test.support

2014-05-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5f75eadecff1 by Zachary Ware in branch '2.7':
Issue #18604: Consolidated checks for GUI availability.
http://hg.python.org/cpython/rev/5f75eadecff1

New changeset eb361f69ddd1 by Zachary Ware in branch '3.4':
Issue #18604: Consolidated checks for GUI availability.
http://hg.python.org/cpython/rev/eb361f69ddd1

New changeset 82caec3865e3 by Zachary Ware in branch 'default':
Closes #18604: Merge with 3.4
http://hg.python.org/cpython/rev/82caec3865e3

--
nosy: +python-dev
resolution:  - fixed
stage: patch review - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18604
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18604] Consolidate gui available checks in test.support

2014-05-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Thank you Zach.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18604
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18604] Consolidate gui available checks in test.support

2014-04-30 Thread Zachary Ware

Zachary Ware added the comment:

If there are no objections forthcoming, I'll try to get this applied to 3.4/3.5 
later this week, then look into backporting to 2.7.

--
assignee:  - zach.ware
components: +Tests, Tkinter
versions: +Python 3.5
Added file: http://bugs.python.org/file35121/issue18604.v2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18604
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18604] Consolidate gui available checks in test.support

2014-01-02 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


--
stage: needs patch - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18604
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18604] Consolidate gui available checks in test.support

2013-12-30 Thread Zachary Ware

Zachary Ware added the comment:

Here's a patch for 3.4, and some sample verbose output[1] from the AMD64 Win7 
buildbot (which runs buildbot as a service, and thus has no gui available).

[1] 
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%20custom/builds/40/steps/test/logs/stdio

--
keywords: +patch
nosy: +zach.ware
Added file: http://bugs.python.org/file33290/issue18604.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18604
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18604] Consolidate gui available checks in test.support

2013-08-08 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18604
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18604] Consolidate gui available checks in test.support

2013-07-31 Thread R. David Murray

R. David Murray added the comment:

I think it is fine to backport this, since it only affects tests, and allows 
the backported idle tests to be consistent.

For 3/4, I agree that requires should skip always if the GUI infrastructure is 
not available.  The don't skip if main logic is appropriate only for deciding 
whether or not to run the tests when the test suite is invoked directly (as 
opposed to through regrtest), not for deciding whether or not to run them when 
the actual resource is being checked.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18604
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18604] Consolidate gui available checks in test.support

2013-07-30 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Current situation:

test.support.requires starts with
 if resource == 'gui' and not _is_gui_available():

On windows, _is_gui_available() uses ctypes to determine that there really is a 
graphics screen. On other systems, it just returns True, even when it should 
return False. The _is_gui_available check is repeated with each requires('gui') 
call even though all after the first would be redundant if False were somehow 
recorded. I think it should be. 

test/test_ttkguionly first tries to import _tkinter, as does test_idle, which 
initializes tcl/tk. It then calls tkinter.test.support.check_tk_availability. 
That either does a 'darwin'-ctypes check similar to the one for Windows in 
_is_gui_available (again to avoid a crash), or it tries to create a tk widget 
and looks for a TclError. Given that tcl has already been initialized 
successfully, the widget creation check is a gui-available check for non-Darwin 
systems. A global in tkinter.test.support records the result of the check so it 
is only run once.

If 'gui' is in use_resources, test_idle just does the widget check for *nix gui 
availability. It records a negative result by removing 'gui' from use_resources.

The tkinter system does not work for Idle because Idle tests use unittest test 
discovery instead of tkinter's custom test discovery. Given that, splitting 
test_idle into test_idle_text and test_idle_gui seems to not be possible. 
Anyway, if test_idle were to be split, categories like '_windows', '_dialogs', 
and '_extensions' would be much more sensible and useful.


For this issue, I propose:

1. Move the custom darwin gui check to test.support, after the custom windows 
gui check. It should be noted that a) Both of these are gui-framework 
independent; and b) Neither seems to be needed for any current buildbots (which 
makes it hard to verify that they work on current systems). However, they were 
needed in the past and might be again in the future, so each should be checked 
*once* in each regrtest run with 'gui' set.

2. If the crash-avoidance checks pass, run tkinter.Tk() as a final check on all 
systems (but especially those not covered by the first checks). But note in 
comments that this will have to change if tk is augmented or optionally 
replaced by another gui framework.

3. In requires(), run the above if 'gui' is set and requested, and record a 
negative result by unsetting 'gui' (removing it from use_resources). Perhaps 
output a note that this has been done. Subsequent gui requests will skip. I 
considered putting this logic in regrtest instead, but see 4.

4. Currently, requires never skips when the caller is the main module. Perhaps 
requires('gui') should skip even then when there is no gui system. This could 
happen if a no-gui system ran a console script with python -m test.text_xxx.

5. Remove the current gui check from test_idle. Idle tests should continue to 
work as they are.

6. Revising test_tk and test_ttk_guionly to use the revised test.support would 
be a larger patch. It might best be done while modernizing the tkinter test 
system to use unittest discovery and .main, in another issue. I am still 
learning the details of the tkinter test system.

-
To avoid immediate controversy, I marked this as an 'enhancement' for 3.4. But 
if the Mac 'darwin' check were currently needed, I would consider it a bug that 
it is buried in a tkinter function whose API is not right for Idle, instead of 
being in test.support. (And in 2.7, the function is buried in a module in a 
package with an illegal name.) So I think backporting should be considered.

--
messages: 193966
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Consolidate gui available checks in test.support
type: enhancement
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18604
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com