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
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
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:
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:
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
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
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
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
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
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
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
___
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
___
12 matches
Mail list logo