[Python-3000] socket makefile bug

Jeremy Hylton jeremy at alum.mit.edu
Fri Aug 3 16:14:51 CEST 2007


I'm looking into httplib problems on the struni branch.  One
unexpected problem is that socket.makefile() is not behaving
correctly. The docs say "The file object references a dup()ped version
of the socket file descriptor, so the file object and socket object
may be closed or garbage-collected independently."  In Python 3000,
the object returned by makefile is no a dup()ped versoin of the file
descriptor.  If I close the socket, I close the file returned by
makefile().

I can dig into the makefile() problem, but I thought I'd mention in
the hopes that someone else thinks its easy to fix.

Jeremy


More information about the Python-3000 mailing list