[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- nosy: -BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Changes by Tal Einat talei...@gmail.com: -- nosy: -taleinat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- assignee: - asvetlov nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Changes by Tal Einat talei...@gmail.com: -- nosy: +taleinat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Mark Lawrence breamore...@yahoo.co.uk added the comment: Given the current debate on python-dev regarding IDLE and its dependancy on tkinter, surely something as serious as a memory leak should be looked into. -- assignee: loewis - nosy: +BreamoreBoy, tjreedy type: - behavior versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Changes by Matthieu Labbé bugs.python@mattlabbe.com: -- nosy: +matthieu.labbe ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: - patch review versions: +Python 3.2 -Python 2.5, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Guilherme Polo ggp...@gmail.com added the comment: I hope you are not too bored for me commenting on this again. So, I have re-though about this issue today and decided to solve it differently (and will include a patch here this time, don't worry about mentions to external repo this time). To solve the problem I replaced the tk.call method in the Tk so it can remove registered commands in the call in case it fails. The other problems reported in this issue are also solved by it, and others that weren't reported are too: Misc.selection_handle (just to name one, but there are others) could leave a undesired item in _tclCommands too. Another advantage of this solution is that extensions benefit from it, and they do not need to change their code (except if they are using a collection of internal functions, which they shouldn't, affected by this patch). Added file: http://bugs.python.org/file12427/keep_tclcommands_correct.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Changes by Guilherme Polo ggp...@gmail.com: Removed file: http://bugs.python.org/file12427/keep_tclcommands_correct.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Changes by Guilherme Polo ggp...@gmail.com: Added file: http://bugs.python.org/file12430/keep_tclcommands_correct.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Guilherme Polo ggp...@gmail.com added the comment: Fix: My previous comment was about changes in Misc.deletecommand not Misc.destroy (this is what you get for guessing the methods changed in the diff, without applying it). To Quentin: I wouldn't bother mentioning it since this new TkinterError exception should go away along the changes in Misc.deletecommand as mentioned in my previous comment. -- versions: +Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Guilherme Polo ggp...@gmail.com added the comment: Rethinking about the changes done in Misc._configure I found out that you don't need any of those there. Isn't it the case of only improving the changes regarding callable overwriting in Misc._options ? So if the value is a callable and the option doesn't exist you also don't _register the callable. Maybe I'm forgetting about something here, so you could bring an example that fails on this reasoning. I've applied these changes and others commented before in a thing I'm testing: http://code.google.com/p/plumage/source/detail?r=85 http://code.google.com/p/plumage/source/detail?r=86 http://code.google.com/p/plumage/source/detail?r=87 http://code.google.com/p/plumage/source/detail?r=89 http://code.google.com/p/plumage/source/detail?r=91 I didn't fix the ones related to Variable yet, but if any of these changes looks fine for someone the diffs would probably apply on the standard Tkinter.py without much problem. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Guilherme Polo ggp...@gmail.com added the comment: The changes in Misc.destroy do not look right, why are you deleting commands created by bind_all (for example) from the root window when a simple widget is destroyed ? It would make more sense to not apply these changes in Misc.destroy, instead, Misc.unbind_all would remove commands from the root using Misc._root.deletecommand and inside Misc._bind it would check if needcleanup is true or false and decide from where to remove. Also, given how this needcleanup parameter is used, I suggest renaming it to widgetcmd, so if it is set 0 it indicates that the command should live in self._root()._tclCommands. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Quentin Gallet-Gilles qgal...@gmail.com added the comment: A little remark : please replace if not globals().has_key('TkinterError'): by if 'TkinterError' not in globals():. has_key is now deprecated in 2.6 and should be avoided. -- nosy: +quentin.gallet-gilles versions: -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Guilherme Polo ggp...@gmail.com added the comment: I've fixed the leaks in Variable doing this: http://code.google.com/p/plumage/source/detail?r=93 I don't use an extra _tclCommands for Variable, instead in __del__ I use the information returned by Variable.trace_vinfo to remove associated callbacks. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Guilherme Polo ggp...@gmail.com added the comment: On Wed, Dec 17, 2008 at 3:51 PM, Guilherme Polo rep...@bugs.python.org wrote: Guilherme Polo ggp...@gmail.com added the comment: Rethinking about the changes done in Misc._configure I found out that you don't need any of those there. Isn't it the case of only improving the changes regarding callable overwriting in Misc._options ? So if the value is a callable and the option doesn't exist you also don't _register the callable. Maybe I'm forgetting about something here, so you could bring an example that fails on this reasoning. Uhm, this will fail in other places in Tkinter that are using _options for handling options not related to widget options but specific command options. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524639] Fix Tkinter Tcl-commands memory-leaks
Guilherme Polo ggp...@gmail.com added the comment: Something like the proposed patch is still needed. But allow me to point out my views towards your current patch: * Changes in Misc.after, Misc._bind: good * Changes in Misc.unbind can be simplified a bit: cbs = self._bind_names(self._bind(('bind', self._w), sequence, func=None, add=None)) could be only: cbs = self._bind_names(self.bind(sequence)) and the comment in the end should go. * Changes in Misc.unbind_all and Misc.unbind_class can be simplified in the same as as Misc.unbind (just change self.bind by self.bind_all and self.bind_class) * Changes in Variable: would you care to elaborate more on these ? Do you need a new _tclCommands there and also use the _tclCommands from its master ? * Changes in Misc._options are somewhat fine. - The comment about Python 2.3, 2.4, 2.5 being bugged because a Tcl_Obj is returned is misleading, so you should change it. - What are you gaining by sorting the cnf keys ? * Changes in Misc._configure uhm.. it is hard to like that one =) Since we are after commands created, why can't we just check the _tclCommands before and after calling tcl here ? So we just remove the difference (maybe move it to a set?) and don't do all those checks in case of error, and then reraise the error. * Changes in Wm.wm_protocol: I almost like it, except that there are two checks for a callable arg now. Hopefully you are still around. -- nosy: +gpolo versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1524639 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com