This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: IDLE: Entry tests should delete before insert.
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.7, Python 3.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: terry.reedy
Priority: normal Keywords: patch

Created on 2017-09-11 03:17 by terry.reedy, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 3501 merged terry.reedy, 2017-09-11 19:44
PR 3502 merged python-dev, 2017-09-11 20:02
Messages (4)
msg301851 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-09-11 03:17
Test_configdialog 'tests' several integer entry widgets by inserting a digit and then checking that the new value was sent to changes.  However, users may delete an entry totally and enter a new value.  If we associate an IntVar with the entry widget, int('') is called somewhere in the process, which raises.  (IntVar(root).set('') does not, so the error is somewhere further along.  The test should imitate users by delete and insert.

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.
msg301896 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-09-11 20:02
New changeset 667522efa8fedfb57fd89d7335d7dfd270f274d5 by Terry Jan Reedy in branch 'master':
bpo-31414: IDLE -- fix tk entry box tests by deleting first. (#3501)
msg301898 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-09-11 20:34
New changeset 31b242459cef0835057f08c8756559b3261aa8ff by Terry Jan Reedy (Miss Islington (bot)) in branch '3.6':
[3.6] bpo-31414: IDLE -- fix tk entry box tests by deleting first. (GH-3501) (#3502)
msg360822 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-01-27 23:36
Opened #39472 for changes dialog itself.
Date User Action Args
2022-04-11 14:58:52adminsetgithub: 75595
2020-01-27 23:37:54terry.reedysetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-01-27 23:36:51terry.reedysetmessages: + msg360822
2017-09-11 20:34:13terry.reedysetmessages: + msg301898
2017-09-11 20:02:51python-devsetpull_requests: + pull_request3495
2017-09-11 20:02:35terry.reedysetmessages: + msg301896
2017-09-11 19:44:31terry.reedysetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request3494
2017-09-11 17:13:25cryvatesetnosy: - cryvate
2017-09-11 17:13:16cryvatesetnosy: + cryvate
2017-09-11 03:18:10terry.reedylinkissue30780 dependencies
2017-09-11 03:17:33terry.reedycreate