System where issue was reproduced is Ubuntu 10.04 32-bit with python 2.6.5 Expected behavior for socket.socketpair as per the docstring: "The arguments are the same as for socket() except the default family is AF_UNIX if defined on the platform; otherwise, the default is AF_INET." Executing socket.socketpair() or socket.socketpair(socket.AF_UNIX) runs fine. However, executing socket.socketpair(socket.AF_INET) throws socket.error with Errno 95 "Operation not supported". It seems either the docstring is off suggesting non-default family can be selected, or the AF_INET option is broken.
It is noted in the Linux man page for socketpair: On Linux, the only supported domain for this call is AF_UNIX (or synonymously, AF_LOCAL). (Most implementations have the same restriction.)