[issue34500] Fix ResourceWarning in difflib.py

2018-09-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Using 'with open' is now standard. Thanks for the update. In the message above, /us/is/. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker

[issue34500] Fix ResourceWarning in difflib.py

2018-09-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 30af2e737aad427d4da97f8dadeeecff6c2b28f5 by Terry Jan Reedy (Mickaël Schoentgen) in branch '2.7': bpo-34500: Fix ResourceWarning in difflib.py (GH-8926) https://github.com/python/cpython/commit/30af2e737aad427d4da97f8dadeeecff6c2b28f5 -

[issue34500] Fix ResourceWarning in difflib.py

2018-09-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: The change to Tools/scripts/diff.py us effectively a backport of the the patch merged for #7582. The git log labels it as a2637729f23dc993e820fd92f0d1759ad714c9b2. The change to Doc/library/difflib.rst does not apply to current 3.x as the test code is no l

[issue34500] Fix ResourceWarning in difflib.py

2018-08-25 Thread Mickaël Schoentgen
Mickaël Schoentgen added the comment: This is a little patch to mostly keep aligned with https://github.com/google/python-fire/pull/135. -- ___ Python tracker ___

[issue34500] Fix ResourceWarning in difflib.py

2018-08-25 Thread Mickaël Schoentgen
Change by Mickaël Schoentgen : -- keywords: +patch pull_requests: +8397 stage: -> patch review ___ Python tracker ___ ___ Python-bug

[issue34500] Fix ResourceWarning in difflib.py

2018-08-25 Thread Mickaël Schoentgen
New submission from Mickaël Schoentgen : Fix 2 unclosed files in the documentation and the difflib.py script: diff.py:77: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/tmpnby8pemn' mode='U' encoding='UTF-8'> fromlines = open(fromfile, 'U').readlines() diff.py:78: ResourceWarn