[issue11767] Maildir iterator leaks file descriptors by default

2011-04-06 Thread Brendan Dolan-Gavitt
Brendan Dolan-Gavitt 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

[issue11767] Maildir iterator leaks file descriptors by default

2011-04-04 Thread Brendan Dolan-Gavitt
New submission from Brendan Dolan-Gavitt : The default constructor for Maildir is rfc822.Message. This means that when iterating over a Maildir mailbox instantiated with default settings, the Mailbox class will return self._factory(self.get_file(key)), leaking the file descriptor returned by