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 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 > "" by just doing "/proc/self". > A more portable (albeit not standard) path for "what file

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//fd is not a directory, but a reg

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 wrote: > > On Oct 30, 2010, at 2:39 PM, Jack Diederich wrote: > > On Fri, Oct 29, 2010 at 8:35 PM, Brett Cannon wrote: > > For those of you who have not noticed, Antoine committed a patch that > > raises a ResourceWarning under a pydebug build if a

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 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

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 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 I discovered

[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, b