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

Victor Stinner webhook-mailer at python.org
Wed Aug 14 05:52:41 EDT 2019


https://github.com/python/cpython/commit/fbb0c032e89c42ab44f5372df40fffb34a91b575
commit: fbb0c032e89c42ab44f5372df40fffb34a91b575
branch: 3.7
author: Hai Shi <shihai1992 at gmail.com>
committer: Victor Stinner <vstinner at redhat.com>
date: 2019-08-14T11:52:36+02:00
summary:

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

Add error number 113 EHOSTUNREACH to get_socket_conn_refused_errs()
of test.support.

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

diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index bf1f0d2120ac..d04d19985f7a 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -1423,6 +1423,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)
     return errors
 
 



More information about the Python-checkins mailing list