[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread Anthony Sottile
Anthony Sottile added the comment: > Anthony: removing 'set' from 'list(set(interable))' is wrong if 'set' were > added to remove duplicates. It's not removed, it's changed to a set comprehension (which was added in 2.7 and 3.0) pyupgrade is very battle tested, having been run on pip,

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: There are about 40 open PRs with 'idle' or 'idlelib' in title. I only found 2 or 3 with merge conflicts related to this issue -- and they are easy to fix. There are more conflicts from other patches (some fixed). These are usually more difficult to fix

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 26af2fae189629d22a87aaf01b92d6f4de92b958 by Miss Islington (bot) in branch '3.9': bpo-43013: Fix old tkinter module names in idlelib (GH-24326) https://github.com/python/cpython/commit/26af2fae189629d22a87aaf01b92d6f4de92b958 --

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread miss-islington
miss-islington added the comment: New changeset 7370be30017f81d2f41f1b4b2abf31dd9a3f8fb1 by Miss Islington (bot) in branch '3.8': bpo-43013: Fix old tkinter module names in idlelib (GH-24326) https://github.com/python/cpython/commit/7370be30017f81d2f41f1b4b2abf31dd9a3f8fb1 --

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: PR for 3. For 2.x, tkinter comprised several modules that became tkinter submodules. For 3.0, 'import tkOld' was replaced by 'import tkinter.new as tkOld', where 'new' is lowercase version of 'Old'. Fix remaining instances of tkColorChooser, tkFileDialog,

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 879986d8a932c4524cb6ff822afc9537de16e28d by Terry Jan Reedy in branch 'master': bpo-43013: Fix old tkinter module names in idlelib (GH-24326) https://github.com/python/cpython/commit/879986d8a932c4524cb6ff822afc9537de16e28d --

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +23147 pull_request: https://github.com/python/cpython/pull/24328 ___ Python tracker ___

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +23146 pull_request: https://github.com/python/cpython/pull/24327 ___ Python tracker ___

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +23145 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24326 ___ Python tracker ___

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Interesting. I would prefer to make fewer changes per pre-PR branch commit, but I see from the doc that I could split changes into at least 4 batches from the existing options. Has this been run/tested on projects better tested than IDLE? Anyway 7. Run

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread Anthony Sottile
Anthony Sottile added the comment: just noticed this PR -- you might be interested in pyupgrade which automates some of these things -- here's (for example) `git ls-files -- Lib/idlelib | grep '\.py$' | xargs pyupgrade --py36-plus ```diff diff --git a/Lib/idlelib/calltip_w.py

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread miss-islington
miss-islington added the comment: New changeset ff06957710aa849f3402b082a7ddd34b0325d6de by Miss Islington (bot) in branch '3.9': bpo-43013: Update idlelib code to 3.x (GH-24315) https://github.com/python/cpython/commit/ff06957710aa849f3402b082a7ddd34b0325d6de --

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +23138 pull_request: https://github.com/python/cpython/pull/24319 ___ Python tracker ___

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 63ebba0d9430a0bc18fd8551ad27b9b25709a4be by Miss Islington (bot) in branch '3.8': bpo-43013: Update idlelib code to 3.x (GH-24315) (#24317) https://github.com/python/cpython/commit/63ebba0d9430a0bc18fd8551ad27b9b25709a4be --

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 8dfe15625e6ea4357a13fec7989a0e6ba2bf1359 by Terry Jan Reedy in branch 'master': bpo-43013: Update idlelib code to 3.x (GH-24315) https://github.com/python/cpython/commit/8dfe15625e6ea4357a13fec7989a0e6ba2bf1359 --

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +23136 pull_request: https://github.com/python/cpython/pull/24317 ___ Python tracker ___

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +23135 pull_request: https://github.com/python/cpython/pull/24316 ___ Python tracker

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +23134 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24315 ___ Python tracker ___

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Delete 2. 'list' is needed if for-suite mutates the dict all 6 either directly or maybe indirectly do so. Not worth checking unless otherwise editing the function. 6. N unneeded .keys() (out of 13 occurrences) when iterating dict. Low priority. First

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: 5. Extraneous () after class name in class header: 'class name():'. Never done in idlelib itself, 27 in test files, mostly in 1 file. -- ___ Python tracker

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-23 Thread Terry J. Reedy
New submission from Terry J. Reedy : Tal, just so you know in case you see a resulting merge conflict. I've been waiting for years to do these until most PRs were closed. Has not happened, and annoyances continue. Since there is no search option I can find to search for PRs with a merge