File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -979,11 +979,9 @@ def _create_connection(address, options):
979979 This is a modified version of create_connection from CPython >= 2.7.
980980 """
981981 host , port = address
982- # Avoid the getaddrinfo importlib deadlock on fork() described in PYTHON-3406.
983- host = host .encode ("idna" )
984982
985983 # Check if dealing with a unix domain socket
986- if host .endswith (b ".sock" ):
984+ if host .endswith (".sock" ):
987985 if not hasattr (socket , "AF_UNIX" ):
988986 raise ConnectionFailure ("UNIX-sockets are not supported on this system" )
989987 sock = socket .socket (socket .AF_UNIX )
@@ -1000,7 +998,7 @@ def _create_connection(address, options):
1000998 # is 'localhost' (::1 is fine). Avoids slow connect issues
1001999 # like PYTHON-356.
10021000 family = socket .AF_INET
1003- if socket .has_ipv6 and host != b "localhost" :
1001+ if socket .has_ipv6 and host != "localhost" :
10041002 family = socket .AF_UNSPEC
10051003
10061004 err = None
You can’t perform that action at this time.
0 commit comments