[issue10265] Fix fd leak in sunau

2010-10-31 Thread Brian Brazil
New submission from Brian Brazil brian.bra...@gmail.com: Please see attached. It's possible that this change will lead to fds leaking if someone is passing in a fd, however a) this is consistent with how other modules (e.g. uu) do it and b) of the 2 (!) uses of this module I found on Google

[issue10265] Fix fd leak in sunau

2010-10-31 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: Forget the attachment? -- nosy: +brian.curtin type: - resource usage versions: +Python 3.2 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10265

[issue10265] Fix fd leak in sunau

2010-10-31 Thread Brian Brazil
Brian Brazil brian.bra...@gmail.com added the comment: That'd help alright. -- keywords: +patch Added file: http://bugs.python.org/file19446/sunau_fd_leak.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10265

[issue10265] Fix fd leak in sunau

2010-10-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: It's possible that this change will lead to fds leaking if someone is passing in a fd I don't think so, why do you say that? That said, there's an indentation problem in your patch. -- nosy: +pitrou

[issue10265] Fix fd leak in sunau

2010-10-31 Thread Brian Brazil
Brian Brazil brian.bra...@gmail.com added the comment: Currently, if you pass in a fd it'll be closed by the __del__. My patch no longer does this so any use of the module depending on this behaviour could leak an fd. However, noone seems to use the module that way. V2 attached. --

[issue10265] Fix fd leak in sunau

2010-10-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Committed in r86067. Thank you Brian! -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10265