New submission from Aldona Majorek <pyt...@ada.majorek.org>:

asyncore.file_wrapper duplicates file descriptor of given file and closes it in 
it's close method.

But unlike socket.socket class it does not automatically call close when object 
is garbage collected.

Users of regular sockets and asyncore.dispatcher do not experience resource 
leaks when they forget to call self.close() in handle_close().

But people using file_dispatcher do loose file descriptor every time 
file_wrapper object is garbage collected without calling self.close() first.

----------
components: Library (Lib)
messages: 130458
nosy: amajorek
priority: normal
severity: normal
status: open
title: asyncore.file_wrapper should implement __del__ and call close there to 
prevent resource leaks and behave like socket.socket does.
type: resource usage
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11453>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to