[issue23865] Fix possible leaks in close methods

2015-05-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset fe340c2a220e by Serhiy Storchaka in branch '2.7': Issue #24125: Saved error's line and column numbers when an error is occured https://hg.python.org/cpython/rev/fe340c2a220e New changeset 7f8cd879687b by Serhiy Storchaka in branch '3.4': Issue #2412

[issue23865] Fix possible leaks in close methods

2015-05-04 Thread Dmitry Shachnev
Dmitry Shachnev added the comment: This broke docutils, see issue #24125. -- nosy: +mitya57 ___ Python tracker ___ ___ Python-bugs-lis

[issue23865] Fix possible leaks in close methods

2015-04-08 Thread Martin Panter
Martin Panter added the comment: Okay, I think I get it. You are setting some attributes to None, in case they happen to be causing a reference cycle. When close() is called, they are no longer needed, so it might help to breaking potential reference cycles. I have often wondered why this was

[issue23865] Fix possible leaks in close methods

2015-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, yet one purpose of the patch is to make close() methods more robust when called at shutdown. Objects can be partially deconstructed at that time, attributes can be set to None to break reference loops. That is why I use None as signaling value and always

[issue23865] Fix possible leaks in close methods

2015-04-07 Thread Martin Panter
Martin Panter added the comment: The change to aifc shouldn’t be needed, unless the underlying file object’s close() is not idempotent. And if that is the case, you’re fixing the bug in the wrong place :) Most of the other changes look good from a rough review, though I was only familiar enou

[issue23865] Fix possible leaks in close methods

2015-04-04 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch fixes two related issues in a number of modules. 1. close() methods sometimes release multiple resources. Every closing operation can fail, but it shouldn't prevent releasing other resources. See for example issue21802. 2. close() should be