Message219060
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. |
|
Date |
User |
Action |
Args |
2014-05-24 22:41:05 | terry.reedy | set | recipients:
+ terry.reedy, jesstess, python-dev, Saimadhav.Heblikar |
2014-05-24 22:41:04 | terry.reedy | set | messageid: <1400971264.12.0.226363622789.issue21477@psf.upfronthosting.co.za> |
2014-05-24 22:41:04 | terry.reedy | link | issue21477 messages |
2014-05-24 22:41:03 | terry.reedy | create | |
|