This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: imaplib test fails with errno 101
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: barry, decaz, r.david.murray, vstinner, xtreak
Priority: normal Keywords: patch

Created on 2019-04-14 14:34 by decaz, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 12834 merged vstinner, 2019-04-15 10:07
PR 12835 merged miss-islington, 2019-04-15 10:35
Messages (7)
msg340212 - (view) Author: Marat Sharafutdinov (decaz) * Date: 2019-04-14 14:34
FAIL: test_imap4_host_default_value (test.test_imaplib.TestImaplib)
Traceback (most recent call last):
  File "/home/python/Lib/test/", line 94, in test_imap4_host_default_value
    self.assertIn(cm.exception.errno, expected_errnos)
AssertionError: 101 not found in [111, 99]


I guess `errno.ENETUNREACH` should be added to the `expected_errnos` as it done within `test_create_connection` (test.test_socket.NetworkConnectionNoServer).
msg340214 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2019-04-14 14:51
Did you see this failure somewhere in CI or is it in local machine? The imaplib test has below comment : 

if hasattr(errno, 'EADDRNOTAVAIL'):
    # socket.create_connection() fails randomly with
    # EADDRNOTAVAIL on Travis CI.

As noted in initial report test_socket has ENETUNREACH added so ENETUNREACH could also be added to this test too?
msg340215 - (view) Author: Marat Sharafutdinov (decaz) * Date: 2019-04-14 14:58
I see this error on my local Bamboo CI (runs on CentOS 7).
msg340256 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-04-15 10:35
New changeset 3c7931e514faf509a39c218c2c9f55efb434628f by Victor Stinner in branch 'master':
bpo-36629: Add support.get_socket_conn_refused_errs() (GH-12834)
msg340258 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-04-15 10:49
New changeset 28ed39e83e4c545fa1da89fd7691cace280296f7 by Victor Stinner (Miss Islington (bot)) in branch '3.7':
bpo-36629: Add support.get_socket_conn_refused_errs() (GH-12834) (GH-12835)
msg340267 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-04-15 12:15
Thanks for your bug report Marat Sharafutdinov, it's now fixed in 3.7 and master (Python 2.7 is not affected, it doesn't have the test_imaplib test method).
msg340268 - (view) Author: Marat Sharafutdinov (decaz) * Date: 2019-04-15 12:18
Thank you for the patch, Victor!
Date User Action Args
2022-04-11 14:59:14adminsetgithub: 80810
2019-04-15 12:18:18decazsetmessages: + msg340268
2019-04-15 12:15:14vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg340267

stage: patch review -> resolved
2019-04-15 10:49:42vstinnersetmessages: + msg340258
2019-04-15 10:35:14miss-islingtonsetpull_requests: + pull_request12760
2019-04-15 10:35:06vstinnersetmessages: + msg340256
2019-04-15 10:07:31vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request12759
2019-04-14 14:58:46decazsetmessages: + msg340215
2019-04-14 14:51:33xtreaksetnosy: + barry, xtreak, vstinner, r.david.murray
messages: + msg340214
2019-04-14 14:34:01decazcreate