Issue6270
Created on 2009-06-11 21:09 by gregcouch, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| delcmd.patch | gregcouch, 2009-06-11 21:17 | revised deletecommand patch | ||
| Messages (3) | |||
|---|---|---|---|
| msg89262 - (view) | Author: Greg Couch (gregcouch) | Date: 2009-06-11 21:09 | |
Sometime around Python 2.5.4, Menu.delete was changed to delete associated entry commands (and thus plug a memory leak). This broke Pmw.OptionMenu because it already had similar code, so when Menu.delete was called, the commands were already gone, and a TclError was raised saying "can't delete Tcl command". While Pmw could be patched to workaround this bug, it seems strange that Tkinter.Misc.deletecommand unconditionally deletes commands it knows nothing about. All uses of deletecommand in Tkinter refer to commands that were Tkinter.Misc._register'ed, so they should appear in the widget._tclCommands list. So the proper solution is to only delete commands that are still registered with the widget. Repeat by: import Pmw om = Pmw.OptionMenu() om.pack() om.setitems(['a', 'b']) om.setitems(['b']) |
|||
| msg220772 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2014-06-16 21:44 | |
I've tried to reproduce this on Windows 7 with Python 3.4.1 and failed. Would somebody else please give it a go. |
|||
| msg316168 - (view) | Author: Cheryl Sabella (cheryl.sabella) * ![]() |
Date: 2018-05-04 12:30 | |
I installed the latest version of pmw on Ubuntu 14.04 and did not receive any errors using the supplied test snippet. It appears that pmw added a patch to the code to only delete the commands when used with Python versions before 2.5.4 so that this bug would not be triggered. This could be revisited if someone else runs into an issue with deletecommand, but closing for now as out of date. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:50 | admin | set | github: 50519 |
| 2018-05-04 12:30:27 | cheryl.sabella | set | status: open -> closed nosy:
+ cheryl.sabella resolution: out of date |
| 2014-06-16 21:44:04 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg220772 |
| 2012-03-22 22:38:41 | asvetlov | set | nosy:
+ asvetlov |
| 2010-07-11 13:25:53 | BreamoreBoy | set | assignee: gpolo versions: - Python 2.6 nosy: + gpolo |
| 2010-02-09 16:49:21 | brian.curtin | set | priority: normal stage: patch review type: crash -> behavior versions: + Python 3.2, - Python 2.5, Python 3.0 |
| 2009-06-11 21:17:33 | gregcouch | set | files: - delcmd.patch |
| 2009-06-11 21:17:26 | gregcouch | set | files: + delcmd.patch |
| 2009-06-11 21:09:39 | gregcouch | create | |
