# HG changeset patch # User Mads Kiilerich # Date 2019-10-03 22:59:06 # Node ID 08b6aa79f2132664b689eb58611e3ca2e9f3596a # Parent 19418a4c6c6119fa3b3176bc957bbc8f7374a50f vcs: drop subprocessio __del__ - it should no longer be necessary, and it might confuse both users and garbage collector After 8dbe46ca608f, we always explicitly close so resources can be released early. __del__ makes it hard for the garbage collector to clean up, and it is misleading to use it as if it was a reliable "Resource acquisition is initialization" finale. diff --git a/kallithea/lib/vcs/subprocessio.py b/kallithea/lib/vcs/subprocessio.py --- a/kallithea/lib/vcs/subprocessio.py +++ b/kallithea/lib/vcs/subprocessio.py @@ -205,9 +205,6 @@ class BufferedGenerator(object): except (GeneratorExit, StopIteration): pass - def __del__(self): - self.close() - #################### # Threaded reader's infrastructure. #################### @@ -426,6 +423,3 @@ class SubprocessIOChunker(object): os.close(self.inputstream) except: pass - - def __del__(self): - self.close()