diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2007-08-03 20:40:09 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2007-08-03 20:40:09 (GMT) |
commit | 5accbdb8123a814d9a602e7bb640ad7f0e953f54 (patch) | |
tree | 469bbd951bbda9c7c542459a6dc76e2aea1bfd74 /Tools/scripts | |
parent | d2ef864f819ba9b3ef834e190491829bbb00b554 (diff) | |
download | cpython-5accbdb8123a814d9a602e7bb640ad7f0e953f54.zip cpython-5accbdb8123a814d9a602e7bb640ad7f0e953f54.tar.gz cpython-5accbdb8123a814d9a602e7bb640ad7f0e953f54.tar.bz2 |
Make sure socket.close() doesn't interfere with socket.makefile().
If a makefile()-generated object is open and its parent socket is
closed, the parent socket should remain open until the child is
closed, too. The code to support this is moderately complex and
requires one extra slots in the socket object.
This change fixes httplib so that several urllib2net test cases pass
again.
Add SocketCloser class to socket.py, which encapsulates the
refcounting logic for sockets after makefile() has been called.
Move SocketIO class from io module to socket module. It's only use is
to implement the raw I/O methods on top of a socket to support
makefile().
Add unittests to test_socket to cover various patterns of close and
makefile.
Diffstat (limited to 'Tools/scripts')
0 files changed, 0 insertions, 0 deletions