◐ Shell
reader mode source ↗
Skip to content

bpo-40121: Fix exception type in test#19267

Merged
zooba merged 1 commit into
python:masterfrom
zooba:bpo-40121
Apr 1, 2020
Merged

bpo-40121: Fix exception type in test#19267
zooba merged 1 commit into
python:masterfrom
zooba:bpo-40121

Conversation

@zooba

@zooba zooba commented Mar 31, 2020

Copy link
Copy Markdown
Member

@zooba

zooba commented Mar 31, 2020

Copy link
Copy Markdown
Member Author

Anyone can feel free to merge this once CI passes.

@zooba zooba merged commit 3ef4a7e into python:master Apr 1, 2020
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @zooba for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@bedevere-bot

Copy link
Copy Markdown

GH-19275 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 1, 2020
(cherry picked from commit 3ef4a7e)

Co-authored-by: Steve Dower <steve.dower@python.org>
@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Arch Linux TraceRefs 3.x has failed when building commit 3ef4a7e.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/312/builds/328) and take a look at the build logs.
  4. Check if the failure is related to this commit (3ef4a7e) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/312/builds/328

Failed tests:

  • test_imaplib
  • test_urllib2_localnet
  • test_ssl

Failed subtests:

  • test_issue5949 - test.test_imaplib.ThreadedNetworkedTestsSSL
  • test_ciphers - test.test_ssl.SimpleBackgroundTests
  • test_https_sni - test.test_urllib2_localnet.TestUrlopen
  • test_connect - test.test_ssl.SimpleBackgroundTests
  • test_https - test.test_urllib2_localnet.TestUrlopen
  • test_tls_unique_channel_binding - test.test_ssl.ThreadedTests
  • test_connect_capath - test.test_ssl.SimpleBackgroundTests
  • test_EOF_without_complete_welcome_message - test.test_imaplib.NewIMAPSSLTests
  • test_get_server_certificate - test.test_ssl.SimpleBackgroundTests
  • test_https_with_cafile - test.test_urllib2_localnet.TestUrlopen
  • test_session_handling - test.test_ssl.ThreadedTests
  • test_connect_cadata - test.test_ssl.SimpleBackgroundTests
  • test_connect_with_context - test.test_ssl.SimpleBackgroundTests

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

404 tests OK.

10 slowest tests:

  • test_concurrent_futures: 2 min 31 sec
  • test_multiprocessing_spawn: 1 min 46 sec
  • test_multiprocessing_forkserver: 1 min 17 sec
  • test_subprocess: 1 min 15 sec
  • test_multiprocessing_fork: 1 min 6 sec
  • test_tokenize: 1 min 4 sec
  • test_nntplib: 1 min 1 sec
  • test_unparse: 58.8 sec
  • test_capi: 55.7 sec
  • test_asyncio: 54.2 sec

3 tests failed:
test_imaplib test_ssl test_urllib2_localnet

13 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_ossaudiodev
test_startfile test_tix test_tk test_ttk_guionly test_winconsoleio
test_winreg test_winsound test_zipfile64

3 re-run tests:
test_imaplib test_ssl test_urllib2_localnet

Total duration: 15 min 10 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_ssl.py", line 2061, in test_connect_cadata
    s.connect(self.server_addr)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1342, in connect
    self._real_connect(addr, False)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1333, in _real_connect
    self.do_handshake()
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/support/__init__.py", line 2333, in decorator
    return func(*args)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_imaplib.py", line 682, in test_issue5949
    self.assertRaises(imaplib.IMAP4.abort,
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/unittest/case.py", line 799, in assertRaises
    return context.handle('assertRaises', args, kwargs)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/unittest/case.py", line 202, in handle
    callable_obj(*args, **kwargs)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/imaplib.py", line 1307, in __init__
    IMAP4.__init__(self, host, port, timeout)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/imaplib.py", line 204, in __init__
    self._connect()
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/imaplib.py", line 246, in _connect
    self.welcome = self._get_response()
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/imaplib.py", line 1058, in _get_response
    resp = self._get_line()
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/imaplib.py", line 1166, in _get_line
    line = self.readline()
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/imaplib.py", line 322, in readline
    line = self.file.readline(_MAXLINE + 1)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/socket.py", line 704, in readinto
    return self._sock.recv_into(b)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: KRB5_S_TKT_NYV] unexpected eof while reading (_ssl.c:2607)


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_ssl.py", line 4345, in test_session_handling
    s.connect((HOST, server.port))
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1342, in connect
    self._real_connect(addr, False)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1329, in _real_connect
    super().connect(addr)
ConnectionRefusedError: [Errno 111] Connection refused


Traceback (most recent call last):
   File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_ssl.py", line 2390, in run
    msg = self.read()
   File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_ssl.py", line 2367, in read
    return self.sslconn.read()
   File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1101, in read
    return self._sslobj.read(len)
 OSError: [Errno 0] Error


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_ssl.py", line 2119, in test_ciphers
    s.connect(self.server_addr)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1342, in connect
    self._real_connect(addr, False)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1333, in _real_connect
    self.do_handshake()
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_ssl.py", line 2040, in test_connect_capath
    s.connect(self.server_addr)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1342, in connect
    self._real_connect(addr, False)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1333, in _real_connect
    self.do_handshake()
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_ssl.py", line 3921, in test_tls_unique_channel_binding
    s.connect((HOST, server.port))
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1342, in connect
    self._real_connect(addr, False)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1333, in _real_connect
    self.do_handshake()
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_urllib2_localnet.py", line 604, in test_https_sni
    self.urlopen("https://localhost:%s" % handler.port, context=context)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_urllib2_localnet.py", line 467, in urlopen
    l.extend(f.readlines(200))
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/http/client.py", line 655, in readline
    result = self.fp.readline(limit)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/socket.py", line 704, in readinto
    return self._sock.recv_into(b)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: KRB5_S_TKT_NYV] unexpected eof while reading (_ssl.c:2607)


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_ssl.py", line 2106, in test_get_server_certificate
    _test_get_server_certificate(self, *self.server_addr, cert=SIGNING_CA)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_ssl.py", line 2271, in _test_get_server_certificate
    pem = ssl.get_server_certificate((host, port), ca_certs=cert)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1483, in get_server_certificate
    with  create_connection(addr) as sock:
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/socket.py", line 843, in create_connection
    raise err
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/socket.py", line 831, in create_connection
    sock.connect(sa)
OSError: [Errno 99] Cannot assign requested address


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_imaplib.py", line 251, in test_EOF_without_complete_welcome_message
    self.assertRaises(imaplib.IMAP4.abort, self.imap_class,
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/unittest/case.py", line 799, in assertRaises
    return context.handle('assertRaises', args, kwargs)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/unittest/case.py", line 202, in handle
    callable_obj(*args, **kwargs)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/imaplib.py", line 1307, in __init__
    IMAP4.__init__(self, host, port, timeout)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/imaplib.py", line 204, in __init__
    self._connect()
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/imaplib.py", line 246, in _connect
    self.welcome = self._get_response()
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/imaplib.py", line 1058, in _get_response
    resp = self._get_line()
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/imaplib.py", line 1166, in _get_line
    line = self.readline()
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/imaplib.py", line 322, in readline
    line = self.file.readline(_MAXLINE + 1)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/socket.py", line 704, in readinto
    return self._sock.recv_into(b)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: KRB5_S_TKT_NYV] unexpected eof while reading (_ssl.c:2607)


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_urllib2_localnet.py", line 570, in test_https_with_cafile
    data = self.urlopen("https://localhost:%s/bizarre" % handler.port,
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_urllib2_localnet.py", line 467, in urlopen
    l.extend(f.readlines(200))
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/http/client.py", line 655, in readline
    result = self.fp.readline(limit)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/socket.py", line 704, in readinto
    return self._sock.recv_into(b)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: KRB5_S_TKT_NYV] unexpected eof while reading (_ssl.c:2607)


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_ssl.py", line 1943, in test_connect
    s.connect(self.server_addr)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1342, in connect
    self._real_connect(addr, False)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1333, in _real_connect
    self.do_handshake()
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_urllib2_localnet.py", line 563, in test_https
    data = self.urlopen("https://localhost:%s/bizarre" % handler.port, context=context)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_urllib2_localnet.py", line 467, in urlopen
    l.extend(f.readlines(200))
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/http/client.py", line 655, in readline
    result = self.fp.readline(limit)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/socket.py", line 704, in readinto
    return self._sock.recv_into(b)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: KRB5_S_TKT_NYV] unexpected eof while reading (_ssl.c:2607)


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_ssl.py", line 2001, in test_connect_with_context
    s.connect(self.server_addr)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1342, in connect
    self._real_connect(addr, False)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1333, in _real_connect
    self.do_handshake()
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test_ssl.py", line 3921, in test_tls_unique_channel_binding
    s.connect((HOST, server.port))
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1342, in connect
    self._real_connect(addr, False)
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/ssl.py", line 1329, in _real_connect
    super().connect(addr)
ConnectionResetError: [Errno 104] Connection reset by peer

@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @zooba for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 1, 2020
(cherry picked from commit 3ef4a7e)

Co-authored-by: Steve Dower <steve.dower@python.org>
@bedevere-bot

Copy link
Copy Markdown

GH-19276 is a backport of this pull request to the 3.8 branch.

miss-islington added a commit that referenced this pull request Apr 1, 2020
(cherry picked from commit 3ef4a7e)

Co-authored-by: Steve Dower <steve.dower@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants