Skip to content

IDLE: improve handling of int entry in settings dialog #83653

Open

Description

@terryjreedy
BPO 39472
Nosy @terryjreedy, @csabella

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 = None
created_at = <Date 2020-01-27.23:34:59.719>
labels = ['expert-IDLE', 'type-bug', '3.9']
title = 'IDLE: improve handling of int entry in settings dialog'
updated_at = <Date 2020-01-28.12:32:21.133>
user = 'https://github.com/terryjreedy'

bugs.python.org fields:

activity = <Date 2020-01-28.12:32:21.133>
actor = 'cheryl.sabella'
assignee = 'terry.reedy'
closed = False
closed_date = None
closer = None
components = ['IDLE']
creation = <Date 2020-01-27.23:34:59.719>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 39472
keywords = []
message_count = 2.0
messages = ['360821', '360867']
nosy_count = 2.0
nosy_names = ['terry.reedy', 'cheryl.sabella']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'test needed'
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue39472'
versions = ['Python 3.9']

Linked PRs

Activity

  1. terryjreedy commented on Jan 27, 2020

    @terryjreedy
    MemberAuthor

    Spinoff from gh-75595, about int entry fields. It claims: Note: a deeper problem is attaching a tracer that get called with each keystroke. Using a StringVar avoids the error when the entry is blanked, but currently allows non-ints to be saved. A better solution would be to not do the auto tracing, but use a IntVar and only call var_changed when the user 'leaves' the box, after checking for a count in a sane range.

    Verify claim and proposed solution.

  2. self-assigned this
    on Jan 27, 2020
  3. csabella commented on Jan 28, 2020

    @csabella
    Contributor

    With keeping it a StringVar, there is an issue where it writes a blank (ie, bad data) to the config file. Steps to reproduce:

    • Go into config dialog and click 'General' tab.
    • Delete value from 'Auto squeeze min line'
    • Click apply or OK. A warning message appears in the terminal
      Warning: config.py - IdleConf.GetOption -
      invalid 'int' value for configuration option 'auto-squeeze-min-lines'
      from section 'PyShell': ''
    • Close out of IDLE.
    • Start IDLE again - the warning reappears, but on the General tab, it shows the original value.

    The issue here is that the custom config-main.cfg is being written to (and then read back in) with the blank.

    I picked the auto-squeezer because it has validation on it - validatecommand=self.digits_only.

  4. transferred this issue fromon Apr 10, 2022
  5. added a commit that references this issue on Jul 1, 2026
  6. added 4 commits that reference this issue on Jul 1, 2026
  7. terryjreedy commented on Sep 27, 2026

    @terryjreedy
    MemberAuthor

    Left open because I believe, without checking carefully, that PR is only a partial fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

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

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions