[Python-checkins] bpo-37583: Add err 113 to support.get_socket_conn_refused_errs() (GH-14729)

Miss Islington (bot) webhook-mailer at python.org
Tue Aug 13 14:11:54 EDT 2019


https://github.com/python/cpython/commit/ee989512528d178d6f088916aba3e67ea9487ceb
commit: ee989512528d178d6f088916aba3e67ea9487ceb
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-08-13T11:11:49-07:00
summary:

bpo-37583: Add err 113 to support.get_socket_conn_refused_errs() (GH-14729)


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 at gmail.com>

files:
M Lib/test/support/__init__.py

diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index e73c65bb9f34..e4e0481d336f 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -1495,6 +1495,9 @@ def get_socket_conn_refused_errs():
         # 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



More information about the Python-checkins mailing list