[issue21682] Refleak in idle_test test_autocomplete

2014-06-08 Thread Zachary Ware

Zachary Ware added the comment:

Terry, did you mean to push Saimadhav's patch?

--

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



[issue21682] Refleak in idle_test test_autocomplete

2014-06-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b8f33440cd5e by Terry Jan Reedy in branch '2.7':
Issue #21682: Replace EditorWindow with mock to eliminate memory leaks.
http://hg.python.org/cpython/rev/b8f33440cd5e

New changeset e6cc02d32957 by Terry Jan Reedy in branch '3.4':
Issue #21682: Replace EditorWindow with mock to eliminate memory leaks.
http://hg.python.org/cpython/rev/e6cc02d32957

New changeset 30c2f65a6346 by Terry Jan Reedy in branch '2.7':
Issue #21682: Replace EditorWindow with mock to eliminate memory leaks.
http://hg.python.org/cpython/rev/30c2f65a6346

New changeset 7f14a2c10c09 by Terry Jan Reedy in branch '3.4':
Issue #21682: Replace EditorWindow with mock to eliminate memory leaks.
http://hg.python.org/cpython/rev/7f14a2c10c09

--
nosy: +python-dev

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



[issue21682] Refleak in idle_test test_autocomplete

2014-06-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Checking the buildbot just now, there is some other stuff after test_tk on X86 
Windows 7, but I ran the command you gave (but with python_d) and it passed ok. 
So I presume this is really fixed and should stay closed.

--

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



[issue21682] Refleak in idle_test test_autocomplete

2014-06-07 Thread Saimadhav Heblikar

Saimadhav Heblikar added the comment:

The patch fixes the refleak. Importing EditorWindow, was perhaps the cause. It 
uses a dummy editwin instead. 

With reference to the current test, was there a particular reason to import 
real EditorWindow module?

--
keywords: +patch
Added file: http://bugs.python.org/file35506/issue21682.diff

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



[issue21682] Refleak in idle_test test_autocomplete

2014-06-07 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This concerns me. I expect that we will eventually want to test a live 
EditorWindow or subclass. It appears that root.destroy does not clear all the 
widgets created by EditorWindow(root=root). My guess it that something is 
created without passing in root, so that tkinter._default_root gets used 
instead. This needs investigation.

I actually ran into this problem before, though not in full form, as I did not 
commit test_formatparagraph.py with EditorWindow(). I used a mock containing a 
method extracted from EditorWindow that does not cause problems, after noting 
the following.

# A real EditorWindow creates unneeded, time-consuming baggage and
# sometimes emits shutdown warnings like this:
# warning: callback failed in WindowList class '_tkinter.TclError'
# : invalid command name .55131368.windows.
# Calling EditorWindow._close in tearDownClass prevents this but causes
# other problems (windows left open).

Why did I commit this with EditorWindow used as is? Because I forgot the above, 
written last August and did not think to see how easy it would be to mock the 
minimum needed. I need to make sure to put DO NOT USE EditorWindow ... in 
README.txt.

I did not get the error message in several all ok runs. We can worry later 
about using mock Text for a non-gui alternative. Thanks Zack for catching this 
and Saimadhav to fixing it.

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

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



[issue21682] Refleak in idle_test test_autocomplete

2014-06-06 Thread Zachary Ware

New submission from Zachary Ware:

The recently added test_autocomplete seems to be hanging onto a reference 
somewhere that it shouldn't be, see below.  This output was obtained by running 
`python -m test -R :: -uall test_idle`.  I tracked it down to test_autocomplete 
with hg bisect, and proved it by running the same test with test_autocomplete 
deleted. This refleak also causes extra scary-looking output when running other 
GUI tests, see 
http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/8412/steps/test/logs/stdio
 (look for test_tk).

[1/1] test_idle
beginning 9 repetitions
123456789
warning: callback failed in WindowList class '_tkinter.TclError' : invalid 
command name .140195409867984.windows
...
repeat ad nauseum
...
warning: callback failed in WindowList class '_tkinter.TclError' : invalid 
command name .140195377829800.windows
.
test_idle leaked [6411, 6411, 6411, 6411] references, sum=25644
test_idle leaked [5150, 5153, 5152, 5152] memory blocks, sum=20607
1 test failed:
test_idle

--
assignee: terry.reedy
components: IDLE, Tests
messages: 219914
nosy: sahutd, terry.reedy, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Refleak in idle_test test_autocomplete
type: resource usage
versions: Python 2.7, Python 3.4, Python 3.5

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