changeset 7909:08b6aa79f213

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.
author Mads Kiilerich <mads@kiilerich.com>
date Thu, 03 Oct 2019 22:59:06 +0200
parents 19418a4c6c61
children 84458edee516
files kallithea/lib/vcs/subprocessio.py
diffstat 1 files changed, 0 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/vcs/subprocessio.py	Wed Oct 09 12:23:21 2019 +0200
+++ b/kallithea/lib/vcs/subprocessio.py	Thu Oct 03 22:59:06 2019 +0200
@@ -205,9 +205,6 @@
         except (GeneratorExit, StopIteration):
             pass
 
-    def __del__(self):
-        self.close()
-
     ####################
     # Threaded reader's infrastructure.
     ####################
@@ -426,6 +423,3 @@
             os.close(self.inputstream)
         except:
             pass
-
-    def __del__(self):
-        self.close()