Re: [Python-Dev] closing files and sockets in a timely manner in the stdlib

2010-10-30 Thread Jack Diederich
On Fri, Oct 29, 2010 at 8:35 PM, Brett Cannon br...@python.org wrote: For those of you who have not noticed, Antoine committed a patch that raises a ResourceWarning under a pydebug build if a file or socket is closed through garbage collection instead of being explicitly closed. Just yesterday

Re: [Python-Dev] closing files and sockets in a timely manner in the stdlib

2010-10-30 Thread Glyph Lefkowitz
On Oct 30, 2010, at 2:39 PM, Jack Diederich wrote: On Fri, Oct 29, 2010 at 8:35 PM, Brett Cannon br...@python.org wrote: For those of you who have not noticed, Antoine committed a patch that raises a ResourceWarning under a pydebug build if a file or socket is closed through garbage

Re: [Python-Dev] closing files and sockets in a timely manner in the stdlib

2010-10-30 Thread Jack Diederich
On Sat, Oct 30, 2010 at 3:06 PM, Glyph Lefkowitz gl...@twistedmatrix.com wrote: On Oct 30, 2010, at 2:39 PM, Jack Diederich wrote: On Fri, Oct 29, 2010 at 8:35 PM, Brett Cannon br...@python.org wrote: For those of you who have not noticed, Antoine committed a patch that raises a

Re: [Python-Dev] closing files and sockets in a timely manner in the stdlib

2010-10-30 Thread Martin v. Löwis
I was happy to find out that the /proc system came from Plan9 because I always thought Plan9 was dead water. But in this particular case Plan9 outdid System7 in the the realm of everything is a file by making everything a file. However, on Plan 9, /proc/n/fd is not a directory, but a regular

Re: [Python-Dev] closing files and sockets in a timely manner in the stdlib

2010-10-30 Thread Bobby Impollonia
On Sat, Oct 30, 2010 at 12:06 PM, Glyph Lefkowitz gl...@twistedmatrix.com wrote: That path (and anything below /proc, really) is a list of open file descriptors specifically on Linux, not *nix.  Also on linux, you can avoid your pid here by just doing /proc/self. A more portable (albeit not

[Python-Dev] closing files and sockets in a timely manner in the stdlib

2010-10-29 Thread Brett Cannon
For those of you who have not noticed, Antoine committed a patch that raises a ResourceWarning under a pydebug build if a file or socket is closed through garbage collection instead of being explicitly closed. I have started to go through the test suite to fix as many of these cases as possible,