Message132988
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 get_file(). Thus, iterating over any reasonably sized maildir mailbox will cause file descriptors to be leaked, and if a non-refcounting GC is used (as in PyPy), it is very likely that the process will run out of file descriptors.
I see that the default has changed to None, for Py3k, but this still means that using a message factory unavoidably leaks file descriptors. Ideally, I'd like the Mailbox class to close the file descriptor passed into the factory; this would mean that file descriptors are never leaked during iteration. |
|
Date |
User |
Action |
Args |
2011-04-04 23:11:10 | moyix | set | recipients:
+ moyix |
2011-04-04 23:11:10 | moyix | set | messageid: <1301958670.39.0.218079408331.issue11767@psf.upfronthosting.co.za> |
2011-04-04 23:11:08 | moyix | link | issue11767 messages |
2011-04-04 23:11:08 | moyix | create | |
|