classification
Title: IDLE: Modernize config_key module
Type: enhancement Stage: resolved
Components: IDLE Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: cheryl.sabella, miss-islington, terry.reedy
Priority: normal Keywords: patch, patch, patch

Created on 2018-12-27 20:27 by cheryl.sabella, last changed 2019-01-07 04:01 by terry.reedy. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 11330 merged cheryl.sabella, 2018-12-27 20:42
PR 11336 merged miss-islington, 2018-12-28 03:48
PR 11360 merged cheryl.sabella, 2018-12-29 22:59
PR 11362 merged miss-islington, 2018-12-30 04:25
PR 11365 merged cheryl.sabella, 2018-12-30 17:49
PR 11370 merged miss-islington, 2018-12-30 19:50
PR 11377 closed cheryl.sabella, 2018-12-31 00:35
PR 11392 merged cheryl.sabella, 2018-12-31 15:29
PR 11393 merged miss-islington, 2018-12-31 20:06
PR 11427 open cheryl.sabella, 2019-01-03 23:55
Messages (18)
msg332614 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2018-12-27 20:27
* Apply PEP8 naming convention.
* Add additional tests to get coverage (close?) to 100%.
* Update to more meaningful names.
* Switch to ttk widgets and revise imports.
* Split toplevel class into a window class and frame class(es).
msg332617 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2018-12-27 20:43
PR11330 is for the PEP8 naming conventions.
msg332634 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-12-28 03:06
I am going to merge on the presumption that you will follow through at least with more tests.  Currently missing other than mac-code, according to coverage output: switch from 'advanced to basic and calls to final_key_selected, build_key_string, get_modifiers, and translate_key.  The last should become a standalone function.

I believe I have encountered a bug.  Change a key binding.  Cancel. Re-open config dialog.  Try to change back.  It says original binding is in use -- which it is if one closes IDLE and reopens, or opens a different instance.  It seems that cancel is not properly undoing the temporary change.
msg332635 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-12-28 03:19
If you submit further PRs for this issue, the blurb will need to be changed as blurbs are for issues, not PRs.
msg332638 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-12-28 03:47
New changeset 55698cc39549523cafc13cc8dd47960d8f73a59f by Terry Jan Reedy (Cheryl Sabella) in branch 'master':
bpo-35598: IDLE: Update config_key.py with PEP8 names (GH-11330)
https://github.com/python/cpython/commit/55698cc39549523cafc13cc8dd47960d8f73a59f
msg332640 - (view) Author: miss-islington (miss-islington) Date: 2018-12-28 04:08
New changeset 4c7f34f73d2d16303798fc4a7043e641cee58e51 by Miss Islington (bot) in branch '3.7':
bpo-35598: IDLE: Update config_key.py with PEP8 names (GH-11330)
https://github.com/python/cpython/commit/4c7f34f73d2d16303798fc4a7043e641cee58e51
msg332738 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2018-12-29 23:03
PR11360 adds tests to increase coverage.  There isn't any refactor (moving translate_key) as part of this.  I also didn't add any GUI-related tests against the buttons, entry, or listbox, except for the cancel key (in case that helps with the new bug reported).
msg332742 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-12-30 04:25
New changeset b0a6196ffd58ff91462191f426706897dc920eee by Terry Jan Reedy (Cheryl Sabella) in branch 'master':
bpo-35598: IDLE: Increase test coverage for config_key.py (#11360)
https://github.com/python/cpython/commit/b0a6196ffd58ff91462191f426706897dc920eee
msg332744 - (view) Author: miss-islington (miss-islington) Date: 2018-12-30 04:39
New changeset 34aadec448f373b95653318e91f6f959354ffa89 by Miss Islington (bot) in branch '3.7':
bpo-35598: IDLE: Increase test coverage for config_key.py (GH-11360)
https://github.com/python/cpython/commit/34aadec448f373b95653318e91f6f959354ffa89
msg332758 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2018-12-30 19:47
PR11365 revises the imports and switches to ttk widgets.
msg332759 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-12-30 19:48
New changeset 4bd79c38efe3cc0a3c724605cf9474e2d1b6b6e2 by Terry Jan Reedy (Cheryl Sabella) in branch 'master':
bpo-35598: IDLE: Switch config_key dialog to ttk widgets (GH-11365)
https://github.com/python/cpython/commit/4bd79c38efe3cc0a3c724605cf9474e2d1b6b6e2
msg332760 - (view) Author: miss-islington (miss-islington) Date: 2018-12-30 20:30
New changeset d2694d47682b84dafef1c172ede7ad16d3b8bbd8 by Miss Islington (bot) in branch '3.7':
bpo-35598: IDLE: Switch config_key dialog to ttk widgets (GH-11365)
https://github.com/python/cpython/commit/d2694d47682b84dafef1c172ede7ad16d3b8bbd8
msg332821 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2018-12-31 15:30
PR11392 is the first refactor.  It moves translate_key to the module level and also moves the definitions of the key tuples to the module level since they are used in more than one place (and they don't change).

As a side note, I'll do the refactoring over several PRs to try to make it manageable to review.

(PR11377 was the first version of this, but somehow I really messed it and couldn't get it back.)
msg332829 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-12-31 20:06
New changeset b4ea8bb080f63ef27682f3f9bbaa4d12a83030b1 by Terry Jan Reedy (Cheryl Sabella) in branch 'master':
bpo-35598: IDLE - Globalize some config_key objects (GH-11392)
https://github.com/python/cpython/commit/b4ea8bb080f63ef27682f3f9bbaa4d12a83030b1
msg332830 - (view) Author: miss-islington (miss-islington) Date: 2018-12-31 20:19
New changeset 74e46483773fa2ed03ed02f1b5e3fb0a4691535e by Miss Islington (bot) in branch '3.7':
bpo-35598: IDLE - Globalize some config_key objects (GH-11392)
https://github.com/python/cpython/commit/74e46483773fa2ed03ed02f1b5e3fb0a4691535e
msg332836 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-12-31 21:43
This issue looks complete to me unless there is something simple not previously mentioned.

Fixing cancel would be a separate issue.

Separating window and frame needs separate discussion on a separate issue, and is not a priority now.  Model popups are different from independent listed windows, so I an not sure what we will want to do for a future tabbed window.

A more immediate concern to me is finishing ttk conversion, including using ttk frames for ttk widgets.  (See #33987 for why.)
msg332953 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2019-01-04 00:02
Terry,

I just saw your note about waiting to split this into a Window and Frame class, which was after I had already gotten the PR ready.  I've been mostly offline for the past few days, so I had been working on those changes locally with the intent of pushing them once I was back online.  I understand if it's not a priority to review.  My main goal in splitting them was more for readability rather than for being able to add it to a Tabbed window.  As a follow up to this refactor, I had hoped to split the Basic and Advanced frames into their own tabs, mostly to clean up the create_widgets and to organize the supporting functions.

Anyway, PR11427 refactors the main frame from the window.
msg333136 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-01-07 04:01
I moved PR 11427 to new issue #35675.
History
Date User Action Args
2019-01-07 04:01:19terry.reedysetstatus: open -> closed
messages: + msg333136

keywords: patch, patch, patch
resolution: fixed
stage: patch review -> resolved
2019-01-04 00:02:33cheryl.sabellasetpull_requests: - pull_request10852
2019-01-04 00:02:20cheryl.sabellasetpull_requests: - pull_request10851
2019-01-04 00:02:01cheryl.sabellasetkeywords: patch, patch, patch

messages: + msg332953
2019-01-03 23:55:19cheryl.sabellasetpull_requests: + pull_request10852
2019-01-03 23:55:11cheryl.sabellasetpull_requests: + pull_request10851
2019-01-03 23:55:04cheryl.sabellasetpull_requests: + pull_request10850
2018-12-31 21:43:18terry.reedysetkeywords: patch, patch, patch

messages: + msg332836
2018-12-31 20:45:26terry.reedysetpull_requests: - pull_request10765
2018-12-31 20:45:08terry.reedysetpull_requests: - pull_request10766
2018-12-31 20:19:56miss-islingtonsetmessages: + msg332830
2018-12-31 20:07:02miss-islingtonsetpull_requests: + pull_request10766
2018-12-31 20:06:58miss-islingtonsetpull_requests: + pull_request10765
2018-12-31 20:06:51miss-islingtonsetpull_requests: + pull_request10764
2018-12-31 20:06:38terry.reedysetmessages: + msg332829
2018-12-31 15:31:36cheryl.sabellasetpull_requests: - pull_request10763
2018-12-31 15:31:09cheryl.sabellasetpull_requests: - pull_request10762
2018-12-31 15:30:34cheryl.sabellasetkeywords: patch, patch, patch

messages: + msg332821
2018-12-31 15:29:51cheryl.sabellasetmessages: - msg332776
2018-12-31 15:29:19cheryl.sabellasetpull_requests: + pull_request10763
2018-12-31 15:29:11cheryl.sabellasetpull_requests: + pull_request10762
2018-12-31 15:29:03cheryl.sabellasetpull_requests: + pull_request10761
2018-12-31 00:41:04cheryl.sabellasetpull_requests: - pull_request10723
2018-12-31 00:40:48cheryl.sabellasetpull_requests: - pull_request10722
2018-12-31 00:39:09cheryl.sabellasetkeywords: patch, patch, patch

messages: + msg332776
2018-12-31 00:35:59cheryl.sabellasetpull_requests: + pull_request10723
2018-12-31 00:35:54cheryl.sabellasetpull_requests: + pull_request10722
2018-12-31 00:35:47cheryl.sabellasetpull_requests: + pull_request10721
2018-12-30 20:30:11miss-islingtonsetmessages: + msg332760
2018-12-30 19:50:18miss-islingtonsetpull_requests: + pull_request10707
2018-12-30 19:48:54terry.reedysetmessages: + msg332759
2018-12-30 19:47:18cheryl.sabellasetkeywords: patch, patch, patch

messages: + msg332758
2018-12-30 17:55:00cheryl.sabellasetpull_requests: - pull_request10697
2018-12-30 17:53:45cheryl.sabellasetpull_requests: - pull_request10696
2018-12-30 17:49:31cheryl.sabellasetpull_requests: + pull_request10697
2018-12-30 17:49:23cheryl.sabellasetpull_requests: + pull_request10696
2018-12-30 17:49:17cheryl.sabellasetpull_requests: + pull_request10695
2018-12-30 06:07:50terry.reedysetpull_requests: - pull_request10686
2018-12-30 06:07:33terry.reedysetpull_requests: - pull_request10687
2018-12-30 04:39:29miss-islingtonsetmessages: + msg332744
2018-12-30 04:25:46miss-islingtonsetpull_requests: + pull_request10687
2018-12-30 04:25:39miss-islingtonsetpull_requests: + pull_request10686
2018-12-30 04:25:33miss-islingtonsetpull_requests: + pull_request10685
2018-12-30 04:25:12terry.reedysetmessages: + msg332742
2018-12-29 23:03:30cheryl.sabellasetkeywords: patch, patch, patch

messages: + msg332738
2018-12-29 23:00:47cheryl.sabellasetpull_requests: - pull_request10681
2018-12-29 23:00:36cheryl.sabellasetpull_requests: - pull_request10680
2018-12-29 22:59:15cheryl.sabellasetpull_requests: + pull_request10681
2018-12-29 22:59:09cheryl.sabellasetpull_requests: + pull_request10680
2018-12-29 22:59:05cheryl.sabellasetpull_requests: + pull_request10679
2018-12-28 04:08:44terry.reedysetpull_requests: - pull_request10610
2018-12-28 04:08:31terry.reedysetpull_requests: - pull_request10611
2018-12-28 04:08:05miss-islingtonsetnosy: + miss-islington
messages: + msg332640
2018-12-28 03:48:25miss-islingtonsetstage: patch review
pull_requests: + pull_request10611
2018-12-28 03:48:19miss-islingtonsetstage: (no value)
pull_requests: + pull_request10610
2018-12-28 03:48:13miss-islingtonsetstage: (no value)
pull_requests: + pull_request10609
2018-12-28 03:47:57terry.reedysetmessages: + msg332638
2018-12-28 03:19:36terry.reedysetkeywords: patch, patch, patch

messages: + msg332635
2018-12-28 03:06:16terry.reedysetkeywords: patch, patch, patch
versions: + Python 3.7
2018-12-28 03:06:05terry.reedysetkeywords: patch, patch, patch

messages: + msg332634
2018-12-28 01:53:36terry.reedysetpull_requests: - pull_request10598
2018-12-28 01:53:20terry.reedysetpull_requests: - pull_request10599
2018-12-27 20:43:50cheryl.sabellasetkeywords: patch, patch, patch

messages: + msg332617
stage: patch review -> (no value)
2018-12-27 20:43:19cheryl.sabellasetkeywords: + patch
stage: patch review
pull_requests: + pull_request10599
2018-12-27 20:43:10cheryl.sabellasetkeywords: + patch
stage: (no value)
pull_requests: + pull_request10598
2018-12-27 20:42:53cheryl.sabellasetkeywords: + patch
stage: (no value)
pull_requests: + pull_request10597
2018-12-27 20:27:57cheryl.sabellacreate