Explicitly importing create_connection in socket.py rather than relying on __all__, because Macs apparently still ship with 2.6.1, which doesn't have the fix to http://bugs.python.org/issue5711 . Thanks to brantley and mcarter for the bug reports, and redbo for putting the clues together.

This commit is contained in:
Ryan Williams
2010-08-12 17:46:52 -07:00
parent 6cf84cf5c1
commit 74d1ceaa06

View File

@@ -7,6 +7,8 @@ exec "\n".join(["%s = __socket.%s" % (var, var) for var in __socket.__all__])
# these are desired but are not in __all__
_GLOBAL_DEFAULT_TIMEOUT = __socket._GLOBAL_DEFAULT_TIMEOUT
_fileobject = __socket._fileobject
# missing from __all__ because 2.6.1 is still common on Macs
create_connection = __socket.create_connection
try:
ssl = __socket.ssl
except AttributeError: