summaryrefslogtreecommitdiffstats
path: root/Lib/_threading_local.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2007-08-03 20:40:09 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2007-08-03 20:40:09 (GMT)
commit5accbdb8123a814d9a602e7bb640ad7f0e953f54 (patch)
tree469bbd951bbda9c7c542459a6dc76e2aea1bfd74 /Lib/_threading_local.py
parentd2ef864f819ba9b3ef834e190491829bbb00b554 (diff)
downloadcpython-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 'Lib/_threading_local.py')
0 files changed, 0 insertions, 0 deletions