Add error number 113 EHOSTUNREACH to get_socket_conn_refused_errs()
of test.support.
(cherry picked from commit
1ac2a83f30312976502fda042db5ce18d10ceec2)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
# bpo-31910: socket.create_connection() fails randomly
# with EADDRNOTAVAIL on Travis CI
errors.append(errno.EADDRNOTAVAIL)
+ if hasattr(errno, 'EHOSTUNREACH'):
+ # bpo-37583: The destination host cannot be reached
+ errors.append(errno.EHOSTUNREACH)
if not IPV6_ENABLED:
errors.append(errno.EAFNOSUPPORT)
return errors