[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which replace the open ... close idiom to the with open idiom in IDLE. -- stage: commit review - patch review Added file: http://bugs.python.org/file31144/idle_with_open.patch ___ Python tracker

[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which replace the open ... close idiom to the with open idiom in IDLE. -- Added file: http://bugs.python.org/file31145/idle_with_open.patch ___ Python tracker rep...@bugs.python.org

[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-08-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset e450e85e2075 by Terry Jan Reedy in branch '3.3': Issue #18151: Replace remaining Idle 'open...close' pairs with 'with open'. http://hg.python.org/cpython/rev/e450e85e2075 New changeset 7f6661a90d02 by Terry Jan Reedy in branch '2.7': Issue #18151:

[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-08-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Patch looked good, so I backported to 2.7 (attached, in case there are problems) and pushed. -- assignee: - terry.reedy resolution: - fixed stage: patch review - committed/rejected status: open - closed Added file:

[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-06-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3c0e8e910125 by Terry Jan Reedy in branch '2.7': #18151, part 2: Silence debug build resource warning for each file opened by http://hg.python.org/cpython/rev/3c0e8e910125 New changeset c541073173bb by Terry Jan Reedy in branch '3.3': #18151, part

[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-06-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2fe64ce5da05 by Terry Jan Reedy in branch '3.3': #18151, part 1: Backport idlelilb portion of Andrew Svetlov's 3.4 patch http://hg.python.org/cpython/rev/2fe64ce5da05 New changeset 0be613638523 by Terry Jan Reedy in branch 'default': #18151 null

[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-06-06 Thread Terry J. Reedy
New submission from Terry J. Reedy: This issue is about uniformly updating the old idiom try: f = open('file') use f) f.close() # omitted at least in GrepDialog except IOError as msg: ignore or display message to the current idiom try: with open('file') as f: use f except

[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-06-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Here is the 'OS' version of the fix and update to grep_it. Change 'OS' to 'IO' on line 17 to apply to current 3.3, without the io2os patch. Besides using 'with', it iterates the files directly instead of iterating blocks of readlines. The two changes make

[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please regenerate your patches without --git for review. Rietveld doesn't like git-style patches. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18151

[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-06-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy: I don't care about patch style but I read somewhere that I 'should' set the hg options file to automatically produce git style diff. However, since the hg doc says that this setting does not affect pushes, I don't know why, and I cannot find where I

[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-06-06 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: Added file: http://bugs.python.org/file30489/grep_it.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18151 ___

[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you. AFAIK you need git style diff only when moving/renaming files. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18151 ___