Here is the whole Socket timeout file.
import socket try: _GLOBAL_DEFAULT_TIMEOUT = socket._GLOBAL_DEFAULT_TIMEOUT except AttributeError: _GLOBAL_DEFAULT_TIMEOUT = object()
As you can see, GLOBAL_DEFAULT_TIMEOUT = object() is just creating an empty object.
socket.setsocketimeout will set the default timeout for new sockets, however, if you do not use sockets directly, this can be easily overwritten.
See this answer for more details.
EDIT: Regarding your next question, yes. I made a program that included a host name for IP address translation, and I had problems with missing addresses. Not sure if this was due to a timeout. I just needed to double check.
David Greydanus
source share