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: Idlelib.configdialog: use 'color' insteadof 'colour'
Type: enhancement Stage: resolved
Components: IDLE Versions: Python 3.7, Python 3.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: serhiy.storchaka, terry.reedy
Priority: normal Keywords: patch

Created on 2016-10-24 21:37 by terry.reedy, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit
color.diff terry.reedy, 2016-10-24 21:37 review
Pull Requests
URL Status Linked Edit
PR 2787 merged terry.reedy, 2017-07-20 21:23
PR 2791 merged terry.reedy, 2017-07-21 05:10
Messages (5)
msg279340 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2016-10-24 21:37
idlelib.configdialog uses the British spelling 'colour' instead of the American spelling 'color' everywhere except for externally mandated import and parameter names and in some recent comments.  idlelib uses 'color' everywhere else.

# change 'colour' to 'color' in idlelib.configdialog 3.6
with open('F:/python/dev/36/lib/idlelib/', 'r+') as f:
    code ='Colour', 'Color').replace('colour', 'color'); f.truncate()

produces the attached patch.  I would like to apply this before 3.6.0rc.  I might wait until a week before that in case I want to backport any configdialog changes to 3.5.  (Any such changes might require regenerating the patch.)
msg279358 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-10-25 06:21
Offtopic. I would suggest you to install GNU sed. From GnuWin [1] or as a part of Cygwin distribution [2]. 4-line Python script can be replaced with one simple command:

    sed -i -re "s/([Cc])olour/\1olor/g"

msg279372 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2016-10-25 07:52
Hmmm. I believe the Win10 Anniversary Update is supposed to include the new Ubuntu-bash-linux subsystem.  I presume it should include sed.  I need to see if I have the update and the subsystem, and what it includes.  I could have done this one, within one file, with replace-all. But I expect to be doing some multifile name changes, and I presume sed will do that.

I decided to apply this tomorrow after re-checking the changes.  I checked current configdialog issues and decided not to worry about backports.  Planned and proposed cosmetic fixups -- PEP8 renamings, ttk replacements (see #27755, for instance), and revised layouts will be bigger issues.  And I want to start on these next.
msg298768 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-07-21 05:07
New changeset a54a8f188a803cd41bdc8758c10d34ba3328c566 by Terry Jan Reedy in branch 'master':
bpo-28523: IDLE: Use 'color' instead of 'colour'. (#2787)
msg298769 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-07-21 05:29
New changeset ac5c1e2ea311d11714f89476c86936f9388d19a4 by Terry Jan Reedy in branch '3.6':
[3.6] bpo-28523: IDLE: Use 'color' instead of 'colour'. (GH-2787) (#2791)
Date User Action Args
2022-04-11 14:58:38adminsetgithub: 72709
2019-03-21 04:53:17terry.reedysetcomponents: + IDLE
2017-07-21 05:51:58terry.reedysetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2017-07-21 05:29:12terry.reedysetmessages: + msg298769
2017-07-21 05:10:19terry.reedysetpull_requests: + pull_request2841
2017-07-21 05:07:00terry.reedysetmessages: + msg298768
2017-07-20 21:23:15terry.reedysetpull_requests: + pull_request2837
2017-06-27 00:46:41terry.reedylinkissue30728 dependencies
2016-10-25 07:52:41terry.reedysetmessages: + msg279372
2016-10-25 06:21:01serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg279358
2016-10-24 21:37:08terry.reedycreate