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 <rep...@bugs.python.org> <http://bugs.python.org/issue18152> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com