Skip to content

IDLE fails to "Delete Custom Key Set" properly #49015

Closed

Description

@alexfainshtein
BPO 4765
Nosy @terryjreedy, @serwy
Superseder
  • bpo-27245: IDLE: Fix deletion of custom themes and key bindings
  • Files
  • removekeybindingswhiletheyexist.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2017-06-20.20:19:28.291>
    created_at = <Date 2008-12-29.04:38:39.348>
    labels = ['expert-IDLE', 'type-bug']
    title = 'IDLE fails to "Delete Custom Key Set" properly'
    updated_at = <Date 2017-06-20.20:19:28.278>
    user = 'https://bugs.python.org/alexfainshtein'

    bugs.python.org fields:

    activity = <Date 2017-06-20.20:19:28.278>
    actor = 'terry.reedy'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-06-20.20:19:28.291>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2008-12-29.04:38:39.348>
    creator = 'alex_fainshtein'
    dependencies = []
    files = ['14645']
    hgrepos = []
    issue_num = 4765
    keywords = ['patch']
    message_count = 8.0
    messages = ['78439', '91261', '144844', '152136', '152147', '220039', '220057', '296484']
    nosy_count = 5.0
    nosy_names = ['terry.reedy', 'gpolo', 'roger.serwy', 'alex_fainshtein', 'nicholas.allevato']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '27245'
    type = 'behavior'
    url = 'https://bugs.python.org/issue4765'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']

    Activity

    1. alexfainshtein commented on Dec 29, 2008

      alexfainshteinmannequin
      MannequinAuthor

      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".

      5. Click "Apply". Then notice that in the folder

        C:\Documents and Settings\<user>\.idlerc,

        two new files appear, config-keys.cfg and config-main.cfg. The
        contents of the latter is

      [Keys]
      default = 0
      name = <Key Set Name>

      SO FAR ALL IS OK.

      1. 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.

      2. 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.

    2. added
      type-bugAn unexpected behavior, bug, or error
      and removed
      type-crashA hard crash of the interpreter, possibly with a core dump
      on Apr 26, 2009
    3. gpolo commented on Aug 4, 2009

      gpolomannequin
      Mannequin

      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).

    4. terryjreedy commented on Oct 3, 2011

      @terryjreedy
      Member

      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.

    5. terryjreedy commented on Jan 27, 2012

      @terryjreedy
      Member

      bpo-13836 is another report of key-binding deletion not working correctly, although IDLE did eventually open and allow re-deletion.

    6. serwy commented on Jan 28, 2012

      serwymannequin
      Mannequin

      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?

    7. BreamoreBoy commented on Jun 8, 2014

      BreamoreBoymannequin
      Mannequin

      This is still a problem on Windows 7 with 3.4.1 but the patch file fixes it.

    8. terryjreedy commented on Jun 8, 2014

      @terryjreedy
      Member

      Add to my list of patches to review.

    9. terryjreedy commented on Jun 20, 2017

      @terryjreedy
      Member

      This issue (and a similar one for custom themes) was fixed in bpo-27245 with a different patch, but to the same effect.

    10. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      topic-IDLEtype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions