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

Idlelib.configdialog: use 'color' insteadof 'colour' #72709

Closed
terryjreedy opened this issue Oct 24, 2016 · 5 comments
Closed

Idlelib.configdialog: use 'color' insteadof 'colour' #72709

terryjreedy opened this issue Oct 24, 2016 · 5 comments
Assignees
Labels
3.7 (EOL) end of life topic-IDLE type-feature A feature request or enhancement

Comments

@terryjreedy
Copy link
Member

BPO 28523
Nosy @terryjreedy, @serhiy-storchaka
PRs
  • bpo-28523: IDLE: Use 'color' instead of 'colour'. #2787
  • [3.6] bpo-28523: IDLE: Use 'color' instead of 'colour'. (GH-2787) #2791
  • Files
  • color.diff
  • 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 2017-07-21.05:51:58.258>
    created_at = <Date 2016-10-24.21:37:08.950>
    labels = ['expert-IDLE', 'type-feature', '3.7']
    title = "Idlelib.configdialog: use 'color' insteadof 'colour'"
    updated_at = <Date 2019-03-21.04:53:17.919>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2019-03-21.04:53:17.919>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2017-07-21.05:51:58.258>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2016-10-24.21:37:08.950>
    creator = 'terry.reedy'
    dependencies = []
    files = ['45207']
    hgrepos = []
    issue_num = 28523
    keywords = ['patch']
    message_count = 5.0
    messages = ['279340', '279358', '279372', '298768', '298769']
    nosy_count = 2.0
    nosy_names = ['terry.reedy', 'serhiy.storchaka']
    pr_nums = ['2787', '2791']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue28523'
    versions = ['Python 3.6', 'Python 3.7']

    @terryjreedy
    Copy link
    Member Author

    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/configdialog.py', 'r+') as f:
        code = f.read().replace('Colour', 'Color').replace('colour', 'color')
        f.seek(0); f.truncate()
        f.write(code)

    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.)

    @terryjreedy terryjreedy added the 3.7 (EOL) end of life label Oct 24, 2016
    @terryjreedy terryjreedy self-assigned this Oct 24, 2016
    @terryjreedy terryjreedy added the type-feature A feature request or enhancement label Oct 24, 2016
    @serhiy-storchaka
    Copy link
    Member

    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" configdialog.py
    

    [1] http://gnuwin32.sourceforge.net/packages/sed.htm
    [2] http://cygwin.com/

    @terryjreedy
    Copy link
    Member Author

    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 -- PEP-8 renamings, ttk replacements (see bpo-27755, for instance), and revised layouts will be bigger issues. And I want to start on these next.

    @terryjreedy
    Copy link
    Member Author

    New changeset a54a8f1 by Terry Jan Reedy in branch 'master':
    bpo-28523: IDLE: Use 'color' instead of 'colour'. (bpo-2787)
    a54a8f1

    @terryjreedy
    Copy link
    Member Author

    New changeset ac5c1e2 by Terry Jan Reedy in branch '3.6':
    [3.6] bpo-28523: IDLE: Use 'color' instead of 'colour'. (GH-2787) (bpo-2791)
    ac5c1e2

    @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
    3.7 (EOL) end of life topic-IDLE type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants