Issue 4765: IDLE fails to "Delete Custom Key Set" properly (original) (raw)

Created on 2008-12-29 04:38 by alex_fainshtein, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
removekeybindingswhiletheyexist.diff gpolo,2009-08-04 17:56 review
Messages (8)
msg78439 - (view) Author: Alex Fainshtein (alex_fainshtein) Date: 2008-12-29 04:38
How to reproduce: 1. Start IDLE -> "Python Shell" window opens. 2. Open Options|"Configure Idle...". 3. In "idle" dialog select "Keys" tab. 4. Click "Set as New Custom Key Set" button. 5 In "New Custom Key Set" dialog, type a name, click "Ok". 4. Click "Apply". Then notice that in the folder C:\Documents and Settings\\.idlerc, two new files appear, config-keys.cfg and config-main.cfg. The contents of the latter is [Keys] default = 0 name = SO FAR ALL IS OK. 5. Now go back to "idle" dialog, click "Delete Custom Key Set", then "Apply". Notice that config-keys.cfg file disappeared, but config-main.cfg neither disappeared nor changed. My guess, THIS IS THE BUG. 6. Now click "Ok" - no reaction. Click "Cancel" - crash: the Python windows disappear. Try to restart IDLE - it WOULD NOT START until config-main.cfg is manually deleted.
msg91261 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-08-04 17:56
Interesting, this is reproducible in any version under any OS but it is more noticeable under Windows. In the step 6 you mentioned, IDLE is busy printing warnings that you will never see if you don't run IDLE from a terminal. Also, when you tried restarting IDLE I believe it were actually starting up but wasting a lot of time with this non-existing key binding. The problem is that when you ask to delete a custom key set, given the steps pointed out, IDLE will first remove the custom key bindings and then will try to remove the bindings associated with the just removed key bindings which will generate a lot of warnings since they no longer exist. A simple solution is to invert some steps when "Apply" is pressed so the bindings are removed while they still exist in the config-keys.cfg file. But if you have a config-keys.cfg like you described below and start IDLE, it will still take a long time to load (at least it does in a virtual machine here).
msg144844 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2011-10-03 22:09
Note the config-main.cfg contains all custom configurations and appears if you make any one of them. Mine currently says [EditorWindow] font = lucida sans unicode [General] autosave = 1 So deleting it is a hack workaround until the bug is fixed.
msg152136 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2012-01-27 22:58
#13836 is another report of key-binding deletion not working correctly, although IDLE did eventually open and allow re-deletion.
msg152147 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2012-01-28 03:12
I am unable to reproduce this bug with the latest development versions in the 2.7 and 3.3 branches. Can someone verify this as well?
msg220039 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-08 17:15
This is still a problem on Windows 7 with 3.4.1 but the patch file fixes it.
msg220057 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-06-08 21:26
Add to my list of patches to review.
msg296484 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-20 20:19
This issue (and a similar one for custom themes) was fixed in #27245 with a different patch, but to the same effect.
History
Date User Action Args
2022-04-11 14:56:43 admin set github: 49015
2017-06-20 20:19:28 terry.reedy set status: open -> closedsuperseder: IDLE: Fix deletion of custom themes and key bindingsnosy: - BreamoreBoymessages: + resolution: duplicatestage: test needed -> resolved
2014-06-08 21:26:17 terry.reedy set messages: + versions: + Python 3.4, Python 3.5, - Python 3.2, Python 3.3
2014-06-08 18:34:55 nicholas.allevato set nosy: + nicholas.allevato
2014-06-08 17:15:30 BreamoreBoy set nosy: + BreamoreBoymessages: +
2012-01-28 03:12:39 roger.serwy set messages: +
2012-01-27 22:58:50 terry.reedy set messages: +
2012-01-27 22:58:43 terry.reedy link issue13836 superseder
2012-01-26 04:29:40 terry.reedy set nosy: + roger.serwy
2011-10-03 22:09:06 terry.reedy set nosy: + terry.reedymessages: +
2011-06-26 21:16:56 terry.reedy set versions: + Python 3.2, Python 3.3, - Python 2.6, Python 3.0, Python 3.1
2009-08-04 17:56:47 gpolo set versions: + Python 2.6, Python 2.7
2009-08-04 17:56:07 gpolo set files: + removekeybindingswhiletheyexist.diffkeywords: + patchmessages: + versions: + Python 3.1
2009-04-26 22:16:39 ajaksu2 set priority: normalnosy: + gpolotype: crash -> behaviorstage: test needed
2008-12-29 04:38:39 alex_fainshtein create