[New-bugs-announce] [issue18152] Idle: add 2.7 backport script
Terry J. Reedy
report at bugs.python.org
Thu Jun 6 20:29:51 CEST 2013
New submission from Terry J. Reedy:
Backporting Idle patches from 3.x to 2.7 would be easier with a canned edit script. Below are the substitutions I can think of immediately. Do any of you know of others?
Easy (str.replace):
tkinter -> Tkinter
import tkinter.messagebox as tkMessageBox -> import tkMessageBox
A bit tricky (but still use str.replace):
OSError -> IOError
This presumes that IOError become OSError in 3.3 as well as 3.4 (#18151). But there are a few existig OSErrors is 3.3 (and that pre-existed the change in 3.4). So there would would need to be a check that a changed line matched an existing 2.7 line.
Harder (2to3 parser?):
print(arglist) -> print arglist # but what if keyword args?
Outputting "fix print on line nn" would be easiest.
README needed (python -m) test -> (python -m) test.regrtest in the test instructions, but this should be the only place that occurs.
I might put 'edit_patch' or whatever in idle_test.
----------
messages: 190719
nosy: Todd.Rovito, asvetlov, ned.deily, roger.serwy, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Idle: add 2.7 backport script
type: enhancement
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18152>
_______________________________________
More information about the New-bugs-announce
mailing list