Author terry.reedy
Recipients Saimadhav.Heblikar, jesstess, python-dev, terry.reedy
Date 2014-05-24.22:41:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1400971264.12.0.226363622789.issue21477@psf.upfronthosting.co.za>
In-reply-to
Content
Since I wanted to get this large patch applied as a basis for further work, I went ahead with the 2.7 backport. I am listing the issues in converting run-runall-34.diff to run-runall-27.diff to help Saimadhav do this in the future.

1. /tkinter/Tkinter/ 7 places (easy).

2. /print(xxx)/print xxx/ 3 places in 2 idlelib files,
but leave print(widget.result) alone in htest

3. /importlib.machinery/imp/ in Pathbrowser.py

4. In textView.py, the 2.7 line
    text = file(filename, 'r').read()
was changed in 3.x to two lines:
    with open(filename, 'r') as f:
        text = f.read()
Since inserting or deleting a line in a diff file (as opposed to the within-line edits above) is tricky, and since this line is part of a chunk being deleted, I left this alone in the -27.diff resulting from the changes above. The diff uploaded included the handpatch changes.

(Note: some time ago, I converted all open statements to 'with open' in 2.7 and 3.x. I did not think of 'file(' as a synonym for 'open('. Any other uses of 'file(' should be converted also.)

5. The surprise I had forgotten about. 'nonlocal', used in the new version of run(), is new in 3.0! Fortunately, I remember the ugly hack we used in 2.x. It does mean, however, that the run code is different in 2.7. Future patches to run should only patch run().

6. ColorDelegator: the code in the 3.x test is displayed for me as
ó
チSc
I replaced source with a string literal. I think we should use a revised version of this, with everything that should be colored, in 3.x also and skip the file read.
History
Date User Action Args
2014-05-24 22:41:05terry.reedysetrecipients: + terry.reedy, jesstess, python-dev, Saimadhav.Heblikar
2014-05-24 22:41:04terry.reedysetmessageid: <1400971264.12.0.226363622789.issue21477@psf.upfronthosting.co.za>
2014-05-24 22:41:04terry.reedylinkissue21477 messages
2014-05-24 22:41:03terry.reedycreate