[issue22826] Support context management protocol in bkfile

2015-03-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue22826] Support context management protocol in bkfile

2015-03-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset ea8c3166d1c2 by Serhiy Storchaka in branch 'default': Issue #22826: The result of open() in Tools/freeze/bkfile.py is now better https://hg.python.org/cpython/rev/ea8c3166d1c2 -- nosy: +python-dev ___ Pyt

[issue22826] Support context management protocol in bkfile

2015-03-19 Thread Berker Peksag
Changes by Berker Peksag : -- assignee: -> serhiy.storchaka stage: patch review -> commit review ___ Python tracker ___ ___ Python-bu

[issue22826] Support context management protocol in bkfile

2014-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch Berker. Updated patch fixes recursion issue. -- Added file: http://bugs.python.org/file37456/bkfile3.patch ___ Python tracker ___ _

[issue22826] Support context management protocol in bkfile

2014-12-15 Thread Berker Peksag
Berker Peksag added the comment: The second patch raises "RuntimeError: maximum recursion depth exceeded" if the target file is exist. File "/home/berker/projects/cpython/default/Tools/freeze/bkfile.py", line 18, in close f.close() RuntimeError: maximum recursion depth exceed

[issue22826] Support context management protocol in bkfile

2014-12-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +needs review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue22826] Support context management protocol in bkfile

2014-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Raymond. I found my old patch written 5 months ago. It drastically simplifies bkfile by using monkey-patching. What approach looks better to you? -- Added file: http://bugs.python.org/file37157/bkfile2.patch

[issue22826] Support context management protocol in bkfile

2014-11-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: This looks correct and it improves readability. One nit, please put the doubled with on a single line instead of using the awkward line break (which looks weird with respect to the indentation of the with-block): +with open(config_c_in) as infp, bkfil

[issue22826] Support context management protocol in bkfile

2014-11-09 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch makes bkfile (file-like class used in freeze) support the context management protocol. This makes bkfile more file-like and makes the use of it simpler and more robust. -- components: Demos and Tools files: bkfile.diff keywords: patc