[issue22068] test_gc fails after test_idle

2014-07-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

ConfigDialog is a good guess as I added a minimal test this month.
I will try to revise to not create loops in the first place.

--

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



[issue22068] test_gc fails after test_idle

2014-07-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch against 2.7 which get rid of reference loops in Tk variables 
and Font. This will fix not only ConfigDialog, but any similar user code.

In 3.4+ such reference loops are successfully resolved, but I think we should 
foreport this path to 3.4+ because it also fixes other minor bug: callbacks 
registered to trace variable now live while the variable lives, not while 
widget lives.

--
assignee:  - serhiy.storchaka
components: +Tkinter
stage:  - patch review
Added file: http://bugs.python.org/file36105/tkinter_refloops-2.7.patch

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



[issue22068] test_gc fails after test_idle

2014-07-26 Thread STINNER Victor

STINNER Victor added the comment:

I agree that the patch shoukd also br applied to 3.4.

--

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



[issue22068] test_gc fails after test_idle

2014-07-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

F:\Python\dev2\py27\pcbuild\python_d.exe -m test.regrtest -R :: -uall test_idle
test_idle leaked [1945, 1945, 1945, 1945] references, sum=7780

There are none with 3.4, so the new gc is doing its job.
There are also none with test_configdialog renamed xtest... ,

GetCfgSectionNameDialog.__init__ in configSectionNameDialog.py saves 
self.parent for later use as the parent for XyxVars.  I am looking at doing the 
same for config dialog.

--
versions: +Python 3.4, Python 3.5

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



[issue22068] test_gc fails after test_idle

2014-07-25 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

$ ./python -m test.regrtest -ugui -v test_idle test_gc
...
==
FAIL: test_saveall (test.test_gc.GCTests)
--
Traceback (most recent call last):
  File /home/serhiy/py/cpython-2.7/Lib/test/test_gc.py, line 200, in 
test_saveall
self.assertEqual(gc.garbage, [])
AssertionError: Lists differ: [Tkinter.StringVar instance a... != []

First list contains 24 additional elements.
First extra element 0:
PY_VAR0

Diff is 1123 characters long. Set self.maxDiff to None to see it.

--

--
components: IDLE, Tests
messages: 223958
nosy: kbk, roger.serwy, serhiy.storchaka, terry.reedy
priority: normal
severity: normal
status: open
title: test_gc fails after test_idle
type: behavior
versions: Python 2.7

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



[issue22068] test_gc fails after test_idle

2014-07-25 Thread STINNER Victor

STINNER Victor added the comment:

It looks like test_idle leaks uncollectable objects.

I modified regrtest to use tracemalloc, I attach the output: tracemalloc.txt. 
Good luck to find the leaks ;-)

--
nosy: +haypo
Added file: http://bugs.python.org/file36087/tracemalloc.txt

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



[issue22068] test_gc fails after test_idle

2014-07-25 Thread STINNER Victor

STINNER Victor added the comment:

regrtest_tracemalloc.patch: my patch for regrtest.py to dump the traceback 
where garbage objects where allocated using tracemalloc.
http://pytracemalloc.readthedocs.org/

(Note: you need to recompile Python to use tracemalloc on Python  3.4.)

--
keywords: +patch
Added file: http://bugs.python.org/file36088/regrtest_tracemalloc.patch

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



[issue22068] test_gc fails after test_idle

2014-07-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Indeed, there are a lot of small reference loops in ConfigDialog. Tk variables 
save reference to the dialog and the dialog saves references to variables. 
Either variables should be created with different argument (i.e. self.parent), 
or they should be deleted when ConfigDialog is destroyed.

--

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