[issue11453] asyncore.file_wrapper should implement __del__ and call close there to prevent resource leaks and behave like socket.socket does.

STINNER Victor report at bugs.python.org
Fri Jun 27 23:54:24 CEST 2014


STINNER Victor added the comment:

I fixed the issue in Python 3.4 and 3.5, thanks for the report.

In Python 3.4+, it's safe to add a destructor (__del__ method): even if the object is part of a reference cycle, it will be destroyed. It's not the case in Python 2.7. I prefer to leave Python 2.7 unchanged to limit the risk of regression.

----------
nosy: +haypo
resolution:  -> fixed
status: open -> closed
versions: +Python 3.4, Python 3.5 -Python 2.7, Python 3.2, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11453>
_______________________________________


More information about the Python-bugs-list mailing list