Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
alexfainshtein mannequin opened this issue Dec 29, 2008 · 8 comments
Closed

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

alexfainshtein mannequin opened this issue Dec 29, 2008 · 8 comments
Labels
topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@alexfainshtein
Copy link
Mannequin

alexfainshtein mannequin commented Dec 29, 2008

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']

    @alexfainshtein
    Copy link
    Mannequin Author

    alexfainshtein mannequin commented Dec 29, 2008

    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.

    @alexfainshtein alexfainshtein mannequin added type-crash A hard crash of the interpreter, possibly with a core dump topic-IDLE labels Dec 29, 2008
    @devdanzin devdanzin mannequin added type-bug An unexpected behavior, bug, or error and removed type-crash A hard crash of the interpreter, possibly with a core dump labels Apr 26, 2009
    @gpolo
    Copy link
    Mannequin

    gpolo mannequin commented Aug 4, 2009

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

    @terryjreedy
    Copy link
    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.

    @terryjreedy
    Copy link
    Member

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

    @serwy
    Copy link
    Mannequin

    serwy mannequin commented Jan 28, 2012

    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?

    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Jun 8, 2014

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

    @terryjreedy
    Copy link
    Member

    Add to my list of patches to review.

    @terryjreedy
    Copy link
    Member

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

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-IDLE type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant