[issue11767] Maildir iterator leaks file descriptors by default

Brendan Dolan-Gavitt report at bugs.python.org
Wed Apr 6 21:59:45 CEST 2011


Brendan Dolan-Gavitt <brendandg at gatech.edu> added the comment:

The _factory object didn't open the file, so why should it close it?

It's also worth noting that things one would naturally consider using as factories (like email.message_from_file) don't close the fd when they're done. I will grant that you could easily create a wrapper factory that does close the descriptor in this case, but that's not the obvious thing to do.

----------

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


More information about the Python-bugs-list mailing list