[issue42142] FAIL tkinter ttk LabeledScale test_resize, and more

2020-11-05 Thread E. Paine


E. Paine  added the comment:

I have been looking for a more permanent solution to that proposed in PR-23156. 
The most obvious solution is probably what I suggested in msg380371 as I don't 
believe the calls to `wait_visibility` are required (though, I don't really 
know enough to say for certain so am wary of making the tests unstable in a 
different way).

Another initial idea I had would be to mess around with threads and interrupt 
the main thread (which would be caught and ignored) if `wait_visibility` took 
too long.

It would be better, though, if we could actively predict a `wait_visibility` 
failure. I looked again at the Tcler's wiki 
(https://wiki.tcl-lang.org/page/tkwait+visibility) and noticed the hidden 
discussion titled "Windows bug or whatever - looking for help". In that 
discussion is a description of exactly the issue we are facing:
"Under strange totally unrelated circumstances [...] tkwait waits forever."

There, the OP includes a version which only calls `wait_visibility` if 
`winfo_ismapped` is 1, saying:
"The "winfo ismapped" is only 0 if the tkwait will stall"

In some initial testing (see attached demo script - uncomment the update call 
for `wait_visibility` to stall) I found the opposite to be true 
(`wait_visibility` fails when the widget *is already* mapped - I think this is 
because `wait_visibility` is waiting for VisibilityNotify but this was already 
issued when the widget was being mapped). Another proposed solution on the wiki 
is to avoid `wait_visibility` completely and instead use a combination of 
various calls including `tkraise` & `focus_force` (ideas/opinions?)

Note: I included both `winfo_ismapped` and `winfo_viewable` in the test script 
to try and find a case where the value of one is not the same as the other but 
I believe `winfo_ismapped` is the one we would want to use.

--
Added file: https://bugs.python.org/file49573/ismapped.py

___
Python tracker 

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



[issue42142] FAIL tkinter ttk LabeledScale test_resize, and more

2020-11-04 Thread E. Paine


Change by E. Paine :


--
keywords: +patch
pull_requests: +22067
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23156

___
Python tracker 

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



[issue42142] FAIL tkinter ttk LabeledScale test_resize, and more

2020-11-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

All 3 of these timeout failures are Ubuntu.  They are a $*#(*&(#& nuisance for 
a required test.  Please submit a PR to skip on Ubuntu, if we can detect that, 
or linux, if not.

I have the impression that LabeledScale and Combobox are both composite 
widgets, in some sense.  Correct?  If so, we might limit the skip to those 
until the wait fails for something else.

--

___
Python tracker 

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



[issue42142] FAIL tkinter ttk LabeledScale test_resize, and more

2020-11-04 Thread E. Paine


E. Paine  added the comment:

I was wrong trying to blame Azure. I have now seen this happen on an Ubuntu 
Github Action for PR-22947 
(https://github.com/python/cpython/pull/22947/checks?check_run_id=1354118848).

test_virtual_event (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... 
Timeout (0:20:00)!
Thread 0x7f549f9d6080 (most recent call first):
  File "/home/runner/work/cpython/cpython/Lib/tkinter/__init__.py", line 696 in 
wait_visibility
  File 
"/home/runner/work/cpython/cpython/Lib/tkinter/test/test_ttk/test_widgets.py", 
line 452 in test_virtual_event

I am tempted just to remove all calls to `wait_visibility` in our tests.

--

___
Python tracker 

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



[issue42142] FAIL tkinter ttk LabeledScale test_resize, and more

2020-10-26 Thread Steve Dower


Steve Dower  added the comment:

I'm as familiar as anyone else that I'll be able to find, but I've really got 
no way to explain why the window isn't becoming visible.

Is it possible that it's trying to default to the process's nShowCmd value 
instead of a constant "normal" window size? That would seem most likely - 
nearly every issue we've had along these lines in the past have been some form 
of inherited process-wide setting.

The other possibility is if the screen size is so small that the window is 
being put outside of the bounds, and then the visibility test being used is one 
that checks whether its bounds are within the current monitor. That may also 
get a false negative in some non-interactive cases.

(I'm assuming, based on two examples, that they're all timing out at the 
"wait_visibility" call.)

--

___
Python tracker 

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



[issue42142] FAIL tkinter ttk LabeledScale test_resize, and more

2020-10-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Steve, we have a new Pipelines-specific intermittent tkinter test failure.  Are 
you familiar with Pipelines, or do you know who is?

--
nosy: +steve.dower

___
Python tracker 

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



[issue42142] FAIL tkinter ttk LabeledScale test_resize, and more

2020-10-26 Thread E. Paine


E. Paine  added the comment:

This is strange as these only seem to have started occurring recently (though 
there hasn't been a change to the tests themselves in a long time). There must 
be something different about how Azure runs the GUI tests because it was on 
Azure that the tests on PR-22682 failed (noting that it was only on Azure they 
failed and all the Azure bots failed - suspicious). Is there someone we can 
nosy who would know better how Azure works (and hence why the possible 
difference)?

I am looking into both Azure and the tests themselves but am not really sure 
how to check if they pass without a messy commit history.

--
nosy: +epaine

___
Python tracker 

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



[issue42142] FAIL tkinter ttk LabeledScale test_resize, and more

2020-10-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Azure Pipelines Ubuntu, as before, but Combobox test_virtual_event.

test_virtual_event (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... 
Timeout (0:20:00)!
Thread 0x7fb09e3f3080 (most recent call first):
  File "/home/vsts/work/1/s/Lib/tkinter/__init__.py", line 696 in 
wait_visibility
  File "/home/vsts/work/1/s/Lib/tkinter/test/test_ttk/test_widgets.py", line 
452 in test_virtual_event

--
components: +Tests, Tkinter
title: FAIL tkinter ttk LabeledScale test_resize -> FAIL tkinter ttk 
LabeledScale test_resize, and more

___
Python tracker 

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