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: Fix deletion of custom themes and key bindings #71432

Closed
terryjreedy opened this issue Jun 7, 2016 · 6 comments
Closed

IDLE: Fix deletion of custom themes and key bindings #71432

terryjreedy opened this issue Jun 7, 2016 · 6 comments
Assignees
Labels
topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@terryjreedy
Copy link
Member

BPO 27245
Nosy @terryjreedy, @serhiy-storchaka
Files
  • idle_delete_current_theme.patch
  • 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 = 'https://github.com/terryjreedy'
    closed_at = <Date 2016-06-14.05:00:40.267>
    created_at = <Date 2016-06-07.01:40:32.376>
    labels = ['expert-IDLE', 'type-bug']
    title = 'IDLE: Fix deletion of custom themes and key bindings'
    updated_at = <Date 2017-06-20.20:19:08.691>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2017-06-20.20:19:08.691>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2016-06-14.05:00:40.267>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2016-06-07.01:40:32.376>
    creator = 'terry.reedy'
    dependencies = []
    files = ['43275']
    hgrepos = []
    issue_num = 27245
    keywords = ['patch']
    message_count = 6.0
    messages = ['267580', '267601', '268518', '268519', '268521', '296483']
    nosy_count = 3.0
    nosy_names = ['terry.reedy', 'python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue27245'
    versions = ['Python 2.7', 'Python 3.5', 'Python 3.6']

    @terryjreedy
    Copy link
    Member Author

    Open IDLE by running from console or importing idlelib.idle in interactive Python window. In the IDLE Preferences dialog, create a new custom theme or key set. [Apply] or close with [OK]. Reopen, if necessary, select the new custom set as current, select Delete, and Apply or close. IDLE will delete the set and then try to read it. A warning message will appear in the console/interpreter for each item in the set that is had to replace with the default value.

    IDLE should replace the deleted set with one of the builtins before reading, or even better, allow and require deletion of something that is not current.

    @terryjreedy terryjreedy added the type-bug An unexpected behavior, bug, or error label Jun 7, 2016
    @serhiy-storchaka
    Copy link
    Member

    Proposed patch should fix this issue.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jun 14, 2016

    New changeset 5c8cddc4a8ee by Terry Jan Reedy in branch '2.7':
    Issue bpo-27245: IDLE: Cleanly delete custom themes and key bindings.
    https://hg.python.org/cpython/rev/5c8cddc4a8ee

    New changeset 438359d00a83 by Terry Jan Reedy in branch '3.5':
    Issue bpo-27245: IDLE: Cleanly delete custom themes and key bindings.
    https://hg.python.org/cpython/rev/438359d00a83

    New changeset 7948633608d5 by Terry Jan Reedy in branch 'default':
    Issue bpo-27245: temporary rename for merge.
    https://hg.python.org/cpython/rev/7948633608d5

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jun 14, 2016

    New changeset 3ac9e7466d8b by Terry Jan Reedy in branch 'default':
    Issue bpo-27245: revert temporary rename
    https://hg.python.org/cpython/rev/3ac9e7466d8b

    @terryjreedy
    Copy link
    Member Author

    Patch amounts to putting 3 lines of apply inline and moving the first up to where is it needed. Serhiy, thanks for discovering the simple fix. It worked for me so I pushed it. I backported because the cascade of error messages is nasty when visible and because the forward merge was easy enough now that I know about the case clash problem.

    @terryjreedy
    Copy link
    Member Author

    In bpo-4765, which I just closed as a duplicate, G Polo had same idea of applying change at top.
    https://bugs.python.org/file14645/removekeybindingswhiletheyexist.diff

    @terryjreedy terryjreedy self-assigned this Jun 20, 2017
    @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

    2 participants