Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imaplib test fails with errno 101 #80810

Closed
decaz mannequin opened this issue Apr 14, 2019 · 7 comments
Closed

imaplib test fails with errno 101 #80810

decaz mannequin opened this issue Apr 14, 2019 · 7 comments
Labels
3.7 (EOL) end of life tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@decaz
Copy link
Mannequin

decaz mannequin commented Apr 14, 2019

BPO 36629
Nosy @warsaw, @vstinner, @bitdancer, @decaz, @tirkarthi
PRs
  • bpo-36629: Add support.get_socket_conn_refused_errs() #12834
  • [3.7] bpo-36629: Add support.get_socket_conn_refused_errs() (GH-12834) #12835
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-04-15.12:15:14.611>
    created_at = <Date 2019-04-14.14:34:01.292>
    labels = ['3.7', 'type-bug', 'tests']
    title = 'imaplib test fails with errno 101'
    updated_at = <Date 2019-04-15.12:18:18.743>
    user = 'https://github.com/decaz'

    bugs.python.org fields:

    activity = <Date 2019-04-15.12:18:18.743>
    actor = 'decaz'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-04-15.12:15:14.611>
    closer = 'vstinner'
    components = ['Tests']
    creation = <Date 2019-04-14.14:34:01.292>
    creator = 'decaz'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36629
    keywords = ['patch']
    message_count = 7.0
    messages = ['340212', '340214', '340215', '340256', '340258', '340267', '340268']
    nosy_count = 5.0
    nosy_names = ['barry', 'vstinner', 'r.david.murray', 'decaz', 'xtreak']
    pr_nums = ['12834', '12835']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue36629'
    versions = ['Python 3.7']

    @decaz
    Copy link
    Mannequin Author

    decaz mannequin commented Apr 14, 2019

    ======================================================================
    FAIL: test_imap4_host_default_value (test.test_imaplib.TestImaplib)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/home/python/Lib/test/test_imaplib.py", 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).

    @decaz decaz mannequin added 3.7 (EOL) end of life tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Apr 14, 2019
    @tirkarthi
    Copy link
    Member

    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.
        expected_errnos.append(errno.EADDRNOTAVAIL)

    As noted in initial report test_socket has ENETUNREACH added

    if hasattr(errno, 'ENETUNREACH'):
    so ENETUNREACH could also be added to this test too?

    @decaz
    Copy link
    Mannequin Author

    decaz mannequin commented Apr 14, 2019

    I see this error on my local Bamboo CI (runs on CentOS 7).

    @vstinner
    Copy link
    Member

    New changeset 3c7931e by Victor Stinner in branch 'master':
    bpo-36629: Add support.get_socket_conn_refused_errs() (GH-12834)
    3c7931e

    @vstinner
    Copy link
    Member

    New changeset 28ed39e by Victor Stinner (Miss Islington (bot)) in branch '3.7':
    bpo-36629: Add support.get_socket_conn_refused_errs() (GH-12834) (GH-12835)
    28ed39e

    @vstinner
    Copy link
    Member

    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).

    @decaz
    Copy link
    Mannequin Author

    decaz mannequin commented Apr 15, 2019

    Thank you for the patch, Victor!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants