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):
979
979
This is a modified version of create_connection from CPython >= 2.7.
980
980
"""
981
981
host , port = address
982
- # Avoid the getaddrinfo importlib deadlock on fork() described in PYTHON-3406.
983
- host = host .encode ("idna" )
984
982
985
983
# Check if dealing with a unix domain socket
986
- if host .endswith (b ".sock" ):
984
+ if host .endswith (".sock" ):
987
985
if not hasattr (socket , "AF_UNIX" ):
988
986
raise ConnectionFailure ("UNIX-sockets are not supported on this system" )
989
987
sock = socket .socket (socket .AF_UNIX )
@@ -1000,7 +998,7 @@ def _create_connection(address, options):
1000
998
# is 'localhost' (::1 is fine). Avoids slow connect issues
1001
999
# like PYTHON-356.
1002
1000
family = socket .AF_INET
1003
- if socket .has_ipv6 and host != b "localhost" :
1001
+ if socket .has_ipv6 and host != "localhost" :
1004
1002
family = socket .AF_UNSPEC
1005
1003
1006
1004
err = None
You can’t perform that action at this time.
0 commit comments