Source: python-aiosmtpd Version: 1.4.2-4 Severity: serious Tags: sid bookworm User: debian...@lists.debian.org Usertags: needs-update User: debian-pyt...@lists.debian.org Usertags: python3.11 Control: affects -1 src:python3-defaults
Dear maintainer(s),We are in the transition of adding python3.11 as a supported Python version [0]. With a recent upload of python3-defaults the autopkgtest of python-aiosmtpd fails in testing when that autopkgtest is run with the binary packages of python3-defaults from unstable. It passes when run with only packages from testing. In tabular form:
pass fail python3-defaults from testing 3.10.6-3 python-aiosmtpd from testing 1.4.2-4 all others from testing from testing I copied some of the output at the bottom of this report.Currently this regression is blocking the migration of python3-defaults to testing [1]. https://docs.python.org/3/whatsnew/3.11.html lists what's new in Python3.11, it may help to identify what needs to be updated.
More information about this bug and the reason for filing it can be found on https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation Paul [0] https://bugs.debian.org/1021984 [1] https://qa.debian.org/excuses.php?package=python3-defaults https://ci.debian.net/data/autopkgtest/testing/amd64/p/python-aiosmtpd/28728877/log.gz=================================== FAILURES =================================== __________________ TestSMTPAuth.test_auth_loginteract_warning __________________
self = <aiosmtpd.tests.test_smtp.TestSMTPAuth object at 0x7f5de322cf90> client = <smtplib.SMTP object at 0x7f5de39e3990> @handler_data(class_=PeekerHandler) def test_auth_loginteract_warning(self, client): client.ehlo("example.com") resp = client.docmd("AUTH WITH_UNDERSCORE") assert resp == (334, b"challenge") with warnings.catch_warnings(record=True) as w:
E assert (501, b"5.5.2...ecode base64") == StatusCode(co...n successful')assert client.docmd("=") == S.S235_AUTH_SUCCESS
E At index 0 diff: 501 != 235 E Use -v to get more diff tests/test_smtp.py:978: AssertionError------------------------------ Captured log setup ------------------------------ INFO mail.log:smtp.py:392 Available AUTH mechanisms: DENYFALSE DENYMISSING DONT LOGIN(builtin) NONE NULL PLAIN(builtin) WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE
INFO mail.log:smtp.py:504 Peer: ('::1', 44698, 0, 0) INFO mail.log:smtp.py:584 ('::1', 44698, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 44698, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2'
INFO mail.log:smtp.py:524 ('::1', 44698, 0, 0) EOF receivedINFO mail.log:smtp.py:726 ('::1', 44698, 0, 0) Connection lost during _handle_client() INFO mail.log:smtp.py:392 Available AUTH mechanisms: DENYFALSE DENYMISSING DONT LOGIN(builtin) NONE NULL PLAIN(builtin) WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE
INFO mail.log:smtp.py:510 ('::1', 44698, 0, 0) connection lost INFO mail.log:smtp.py:504 Peer: ('::1', 44706, 0, 0) INFO mail.log:smtp.py:584 ('::1', 44706, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 44706, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2' ------------------------------ Captured log call ------------------------------- DEBUG mail.log:smtp.py:271 _handle_client readline: b'ehlo example.com\r\n'
INFO mail.log:smtp.py:271 ('::1', 44706, 0, 0) >> b'ehlo example.com' DEBUG mail.log:smtp.py:570 ('::1', 44706, 0, 0) << b'250-ci-331-51154d3a' DEBUG mail.log:smtp.py:570 ('::1', 44706, 0, 0) << b'250-SIZE 33554432' DEBUG mail.log:smtp.py:570 ('::1', 44706, 0, 0) << b'250-SMTPUTF8'DEBUG mail.log:smtp.py:570 ('::1', 44706, 0, 0) << b'250-AUTH DENYFALSE DENYMISSING DONT LOGIN NONE NULL PLAIN WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE'
DEBUG mail.log:smtp.py:570 ('::1', 44706, 0, 0) << b'250 HELP'DEBUG mail.log:smtp.py:271 _handle_client readline: b'AUTH WITH_UNDERSCORE\r\n' INFO mail.log:smtp.py:271 ('::1', 44706, 0, 0) >> b'AUTH WITH_UNDERSCORE'
DEBUG mail.log:smtp.py:921 Using handler auth_ hook for 'WITH_UNDERSCORE'DEBUG mail.log:smtp.py:991 ('::1', 44706, 0, 0) << challenge: b'334 challenge'
DEBUG mail.log:smtp.py:570 ('::1', 44706, 0, 0) << b'334 challenge' DEBUG mail.log:smtp.py:997 ('::1', 44706, 0, 0) >> b'=\r\n'DEBUG mail.log:smtp.py:1007 ('::1', 44706, 0, 0) can't decode base64: b'=' DEBUG mail.log:smtp.py:570 ('::1', 44706, 0, 0) << b"501 5.5.2 Can't decode base64"
DEBUG mail.log:smtp.py:929 auth_WITH_UNDERSCORE returned '250 OK'WARNING mail.log:smtp.py:184 Session.login_data is deprecated and will be removed in version 2.0 DEBUG mail.log:smtp.py:570 ('::1', 44706, 0, 0) << b'235 2.7.0 Authentication successful' _____________________ TestAuthMechanisms.test_plain1_empty _____________________
self = <aiosmtpd.tests.test_smtp.TestAuthMechanisms object at 0x7f5de323b550> do_auth_plain1 = <function TestAuthMechanisms.do_auth_plain1.<locals>.do at 0x7f5de3a0c0e0>
def test_plain1_empty(self, do_auth_plain1): resp = do_auth_plain1("=")
E assert (501, b"5.5.2...ecode base64") == StatusCode(co...t auth value") E At index 1 diff: b"5.5.2 Can't decode base64" != b"5.5.2 Can't split auth value"assert resp == S.S501_AUTH_CANTSPLIT
E Use -v to get more diff tests/test_smtp.py:1092: AssertionError------------------------------ Captured log setup ------------------------------ INFO mail.log:smtp.py:392 Available AUTH mechanisms: DENYFALSE DENYMISSING LOGIN(builtin) NONE NULL PLAIN(builtin) WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE
INFO mail.log:smtp.py:504 Peer: ('::1', 45020, 0, 0) INFO mail.log:smtp.py:584 ('::1', 45020, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 45020, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2'
INFO mail.log:smtp.py:524 ('::1', 45020, 0, 0) EOF receivedINFO mail.log:smtp.py:392 Available AUTH mechanisms: DENYFALSE DENYMISSING LOGIN(builtin) NONE NULL PLAIN(builtin) WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE INFO mail.log:smtp.py:726 ('::1', 45020, 0, 0) Connection lost during _handle_client()
INFO mail.log:smtp.py:504 Peer: ('::1', 45024, 0, 0) INFO mail.log:smtp.py:510 ('::1', 45020, 0, 0) connection lost INFO mail.log:smtp.py:584 ('::1', 45024, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 45024, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2' DEBUG mail.log:smtp.py:271 _handle_client readline: b'ehlo example.com\r\n'
INFO mail.log:smtp.py:271 ('::1', 45024, 0, 0) >> b'ehlo example.com' DEBUG mail.log:smtp.py:570 ('::1', 45024, 0, 0) << b'250-ci-331-51154d3a' DEBUG mail.log:smtp.py:570 ('::1', 45024, 0, 0) << b'250-SIZE 33554432' DEBUG mail.log:smtp.py:570 ('::1', 45024, 0, 0) << b'250-SMTPUTF8'DEBUG mail.log:smtp.py:570 ('::1', 45024, 0, 0) << b'250-AUTH DENYFALSE DENYMISSING LOGIN NONE NULL PLAIN WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE' ------------------------------ Captured log call -------------------------------
DEBUG mail.log:smtp.py:570 ('::1', 45024, 0, 0) << b'250 HELP'DEBUG mail.log:smtp.py:271 _handle_client readline: b'AUTH PLAIN ********\r\n'
INFO mail.log:smtp.py:271 ('::1', 45024, 0, 0) >> b'AUTH PLAIN ********' DEBUG mail.log:smtp.py:921 Using builtin auth_ hook for 'PLAIN'---------------------------- Captured log teardown -----------------------------
DEBUG mail.log:smtp.py:271 _handle_client readline: b'QUIT\r\n' INFO mail.log:smtp.py:271 ('::1', 45024, 0, 0) >> b'QUIT' DEBUG mail.log:smtp.py:570 ('::1', 45024, 0, 0) << b'221 Bye' INFO mail.log:smtp.py:510 ('::1', 45024, 0, 0) connection lostINFO mail.log:smtp.py:726 ('::1', 45024, 0, 0) Connection lost during _handle_client() ________________ TestAuthMechanisms.test_plain2_no_credentials _________________
self = <aiosmtpd.tests.test_smtp.TestAuthMechanisms object at 0x7f5de33019d0>
client_auth_plain2 = <smtplib.SMTP object at 0x7f5de3435fd0> def test_plain2_no_credentials(self, client_auth_plain2): resp = client_auth_plain2.docmd("=")
E assert (501, b"5.5.2...ecode base64") == StatusCode(co...t auth value") E At index 1 diff: b"5.5.2 Can't decode base64" != b"5.5.2 Can't split auth value"assert resp == S.S501_AUTH_CANTSPLIT
E Use -v to get more diff tests/test_smtp.py:1154: AssertionError------------------------------ Captured log setup ------------------------------ INFO mail.log:smtp.py:392 Available AUTH mechanisms: DENYFALSE DENYMISSING LOGIN(builtin) NONE NULL PLAIN(builtin) WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE
INFO mail.log:smtp.py:504 Peer: ('::1', 45082, 0, 0) INFO mail.log:smtp.py:584 ('::1', 45082, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 45082, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2'
INFO mail.log:smtp.py:524 ('::1', 45082, 0, 0) EOF receivedINFO mail.log:smtp.py:726 ('::1', 45082, 0, 0) Connection lost during _handle_client()
INFO mail.log:smtp.py:510 ('::1', 45082, 0, 0) connection lostINFO mail.log:smtp.py:392 Available AUTH mechanisms: DENYFALSE DENYMISSING LOGIN(builtin) NONE NULL PLAIN(builtin) WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE
INFO mail.log:smtp.py:504 Peer: ('::1', 45088, 0, 0) INFO mail.log:smtp.py:584 ('::1', 45088, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 45088, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2' DEBUG mail.log:smtp.py:271 _handle_client readline: b'ehlo example.com\r\n'
INFO mail.log:smtp.py:271 ('::1', 45088, 0, 0) >> b'ehlo example.com' DEBUG mail.log:smtp.py:570 ('::1', 45088, 0, 0) << b'250-ci-331-51154d3a' DEBUG mail.log:smtp.py:570 ('::1', 45088, 0, 0) << b'250-SIZE 33554432' DEBUG mail.log:smtp.py:570 ('::1', 45088, 0, 0) << b'250-SMTPUTF8'DEBUG mail.log:smtp.py:570 ('::1', 45088, 0, 0) << b'250-AUTH DENYFALSE DENYMISSING LOGIN NONE NULL PLAIN WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE'
DEBUG mail.log:smtp.py:570 ('::1', 45088, 0, 0) << b'250 HELP' DEBUG mail.log:smtp.py:271 _handle_client readline: b'AUTH PLAIN\r\n' INFO mail.log:smtp.py:271 ('::1', 45088, 0, 0) >> b'AUTH PLAIN' DEBUG mail.log:smtp.py:921 Using builtin auth_ hook for 'PLAIN' DEBUG mail.log:smtp.py:991 ('::1', 45088, 0, 0) << challenge: b'334 ' DEBUG mail.log:smtp.py:570 ('::1', 45088, 0, 0) << b'334 '------------------------------ Captured log call ------------------------------- DEBUG mail.log:smtp.py:1007 ('::1', 45088, 0, 0) can't decode base64: b'=' DEBUG mail.log:smtp.py:570 ('::1', 45088, 0, 0) << b"501 5.5.2 Can't decode base64" DEBUG mail.log:smtp.py:929 auth_PLAIN returned AuthResult(success=False, handled=True, message=None, auth_data=...) ---------------------------- Captured log teardown -----------------------------
DEBUG mail.log:smtp.py:271 _handle_client readline: b'QUIT\r\n' INFO mail.log:smtp.py:271 ('::1', 45088, 0, 0) >> b'QUIT' DEBUG mail.log:smtp.py:570 ('::1', 45088, 0, 0) << b'221 Bye' INFO mail.log:smtp.py:510 ('::1', 45088, 0, 0) connection lostINFO mail.log:smtp.py:726 ('::1', 45088, 0, 0) Connection lost during _handle_client() _______________ TestAuthMechanisms.test_login3_empty_credentials _______________
self = <aiosmtpd.tests.test_smtp.TestAuthMechanisms object at 0x7f5de32db950> do_auth_login3 = <function TestAuthMechanisms.do_auth_login3.<locals>.do at 0x7f5de3a0ee80>
def test_login3_empty_credentials(self, do_auth_login3): resp = do_auth_login3("=")
E assert (501, b"5.5.2...ecode base64") == StatusCode(co...UGFzc3dvcmQA')assert resp == S.S334_AUTH_PASSWORD
E At index 0 diff: 501 != 334 E Use -v to get more diff tests/test_smtp.py:1223: AssertionError------------------------------ Captured log setup ------------------------------ INFO mail.log:smtp.py:392 Available AUTH mechanisms: DENYFALSE DENYMISSING LOGIN(builtin) NONE NULL PLAIN(builtin) WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE
INFO mail.log:smtp.py:504 Peer: ('::1', 45232, 0, 0) INFO mail.log:smtp.py:584 ('::1', 45232, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 45232, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2'
INFO mail.log:smtp.py:524 ('::1', 45232, 0, 0) EOF receivedINFO mail.log:smtp.py:392 Available AUTH mechanisms: DENYFALSE DENYMISSING LOGIN(builtin) NONE NULL PLAIN(builtin) WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE INFO mail.log:smtp.py:726 ('::1', 45232, 0, 0) Connection lost during _handle_client()
INFO mail.log:smtp.py:504 Peer: ('::1', 45238, 0, 0) INFO mail.log:smtp.py:510 ('::1', 45232, 0, 0) connection lost INFO mail.log:smtp.py:584 ('::1', 45238, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 45238, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2' DEBUG mail.log:smtp.py:271 _handle_client readline: b'ehlo example.com\r\n'
INFO mail.log:smtp.py:271 ('::1', 45238, 0, 0) >> b'ehlo example.com' DEBUG mail.log:smtp.py:570 ('::1', 45238, 0, 0) << b'250-ci-331-51154d3a' DEBUG mail.log:smtp.py:570 ('::1', 45238, 0, 0) << b'250-SIZE 33554432' DEBUG mail.log:smtp.py:570 ('::1', 45238, 0, 0) << b'250-SMTPUTF8'DEBUG mail.log:smtp.py:570 ('::1', 45238, 0, 0) << b'250-AUTH DENYFALSE DENYMISSING LOGIN NONE NULL PLAIN WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE'
DEBUG mail.log:smtp.py:570 ('::1', 45238, 0, 0) << b'250 HELP' DEBUG mail.log:smtp.py:271 _handle_client readline: b'AUTH LOGIN\r\n' INFO mail.log:smtp.py:271 ('::1', 45238, 0, 0) >> b'AUTH LOGIN' DEBUG mail.log:smtp.py:921 Using builtin auth_ hook for 'LOGIN'DEBUG mail.log:smtp.py:991 ('::1', 45238, 0, 0) << challenge: b'334 VXNlciBOYW1lAA==' ------------------------------ Captured log call ------------------------------- DEBUG mail.log:smtp.py:570 ('::1', 45238, 0, 0) << b'334 VXNlciBOYW1lAA==' DEBUG mail.log:smtp.py:1007 ('::1', 45238, 0, 0) can't decode base64: b'=' ---------------------------- Captured log teardown -----------------------------
DEBUG mail.log:smtp.py:271 _handle_client readline: b'QUIT\r\n' INFO mail.log:smtp.py:271 ('::1', 45238, 0, 0) >> b'QUIT' DEBUG mail.log:smtp.py:570 ('::1', 45238, 0, 0) << b'221 Bye' INFO mail.log:smtp.py:510 ('::1', 45238, 0, 0) connection lostINFO mail.log:smtp.py:726 ('::1', 45238, 0, 0) Connection lost during _handle_client() ________________ TestAuthMechanisms.test_login3_abort_password _________________
self = <aiosmtpd.tests.test_smtp.TestAuthMechanisms object at 0x7f5de32d8990> do_auth_login3 = <function TestAuthMechanisms.do_auth_login3.<locals>.do at 0x7f5de3a0e0c0>
def test_login3_abort_password(self, do_auth_login3): resp = do_auth_login3("=")
E assert (501, b"5.5.2...ecode base64") == StatusCode(co...UGFzc3dvcmQA')assert resp == S.S334_AUTH_PASSWORD
E At index 0 diff: 501 != 334 E Use -v to get more diff tests/test_smtp.py:1233: AssertionError------------------------------ Captured log setup ------------------------------ INFO mail.log:smtp.py:392 Available AUTH mechanisms: DENYFALSE DENYMISSING LOGIN(builtin) NONE NULL PLAIN(builtin) WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE
INFO mail.log:smtp.py:504 Peer: ('::1', 45266, 0, 0) INFO mail.log:smtp.py:584 ('::1', 45266, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 45266, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2'
INFO mail.log:smtp.py:524 ('::1', 45266, 0, 0) EOF receivedINFO mail.log:smtp.py:726 ('::1', 45266, 0, 0) Connection lost during _handle_client()
INFO mail.log:smtp.py:510 ('::1', 45266, 0, 0) connection lostINFO mail.log:smtp.py:392 Available AUTH mechanisms: DENYFALSE DENYMISSING LOGIN(builtin) NONE NULL PLAIN(builtin) WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE
INFO mail.log:smtp.py:504 Peer: ('::1', 45276, 0, 0) INFO mail.log:smtp.py:584 ('::1', 45276, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 45276, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2' DEBUG mail.log:smtp.py:271 _handle_client readline: b'ehlo example.com\r\n'
INFO mail.log:smtp.py:271 ('::1', 45276, 0, 0) >> b'ehlo example.com' DEBUG mail.log:smtp.py:570 ('::1', 45276, 0, 0) << b'250-ci-331-51154d3a' DEBUG mail.log:smtp.py:570 ('::1', 45276, 0, 0) << b'250-SIZE 33554432' DEBUG mail.log:smtp.py:570 ('::1', 45276, 0, 0) << b'250-SMTPUTF8'DEBUG mail.log:smtp.py:570 ('::1', 45276, 0, 0) << b'250-AUTH DENYFALSE DENYMISSING LOGIN NONE NULL PLAIN WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE'
DEBUG mail.log:smtp.py:570 ('::1', 45276, 0, 0) << b'250 HELP' DEBUG mail.log:smtp.py:271 _handle_client readline: b'AUTH LOGIN\r\n' INFO mail.log:smtp.py:271 ('::1', 45276, 0, 0) >> b'AUTH LOGIN' DEBUG mail.log:smtp.py:921 Using builtin auth_ hook for 'LOGIN'DEBUG mail.log:smtp.py:991 ('::1', 45276, 0, 0) << challenge: b'334 VXNlciBOYW1lAA==' DEBUG mail.log:smtp.py:570 ('::1', 45276, 0, 0) << b'334 VXNlciBOYW1lAA==' ------------------------------ Captured log call ------------------------------- DEBUG mail.log:smtp.py:1007 ('::1', 45276, 0, 0) can't decode base64: b'=' DEBUG mail.log:smtp.py:570 ('::1', 45276, 0, 0) << b"501 5.5.2 Can't decode base64" DEBUG mail.log:smtp.py:929 auth_LOGIN returned AuthResult(success=False, handled=True, message=None, auth_data=...) ---------------------------- Captured log teardown -----------------------------
DEBUG mail.log:smtp.py:271 _handle_client readline: b'QUIT\r\n' INFO mail.log:smtp.py:271 ('::1', 45276, 0, 0) >> b'QUIT' DEBUG mail.log:smtp.py:570 ('::1', 45276, 0, 0) << b'221 Bye' INFO mail.log:smtp.py:510 ('::1', 45276, 0, 0) connection lostINFO mail.log:smtp.py:726 ('::1', 45276, 0, 0) Connection lost during _handle_client() __________________________ TestStartTLS.test_starttls __________________________
self = <aiosmtpd.tests.test_starttls.TestStartTLS object at 0x7f5de37873d0> tls_controller = <aiosmtpd.controller.Controller object at 0x7f5de33cc5d0> client = <smtplib.SMTP object at 0x7f5de35b7890> @handler_data(class_=ReceivingHandler) def test_starttls(self, tls_controller, client): sender = "sen...@example.com" recipients = ["rc...@example.com"] code, _ = client.ehlo("example.com") assert code == 250 assert "starttls" in client.esmtp_features
resp = client.starttls()
tests/test_starttls.py:141: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/smtplib.py:790: in starttls
self.sock = context.wrap_socket(self.sock, /usr/lib/python3.11/ssl.py:517: in wrap_socket return self.sslsocket_class._create( /usr/lib/python3.11/ssl.py:1075: in _create self.do_handshake()_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <ssl.SSLSocket [closed] fd=-1, family=10, type=1, proto=6>, block = False
@_sslcopydoc def do_handshake(self, block=False): self._check_connected() timeout = self.gettimeout() try: if timeout == 0.0 and block: self.settimeout(None)
E ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:992)self._sslobj.do_handshake()
/usr/lib/python3.11/ssl.py:1346: SSLZeroReturnError------------------------------ Captured log setup ------------------------------ INFO mail.log:smtp.py:392 Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO mail.log:smtp.py:504 Peer: ('::1', 46556, 0, 0) INFO mail.log:smtp.py:584 ('::1', 46556, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 46556, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2'
INFO mail.log:smtp.py:524 ('::1', 46556, 0, 0) EOF receivedINFO mail.log:smtp.py:726 ('::1', 46556, 0, 0) Connection lost during _handle_client() INFO mail.log:smtp.py:392 Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO mail.log:smtp.py:510 ('::1', 46556, 0, 0) connection lost INFO mail.log:smtp.py:504 Peer: ('::1', 46570, 0, 0) INFO mail.log:smtp.py:584 ('::1', 46570, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 46570, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2' ------------------------------ Captured log call ------------------------------- DEBUG mail.log:smtp.py:271 _handle_client readline: b'ehlo example.com\r\n'
INFO mail.log:smtp.py:271 ('::1', 46570, 0, 0) >> b'ehlo example.com' DEBUG mail.log:smtp.py:570 ('::1', 46570, 0, 0) << b'250-ci-331-51154d3a' DEBUG mail.log:smtp.py:570 ('::1', 46570, 0, 0) << b'250-SIZE 33554432' DEBUG mail.log:smtp.py:570 ('::1', 46570, 0, 0) << b'250-SMTPUTF8' DEBUG mail.log:smtp.py:570 ('::1', 46570, 0, 0) << b'250-STARTTLS' DEBUG mail.log:smtp.py:570 ('::1', 46570, 0, 0) << b'250 HELP' DEBUG mail.log:smtp.py:271 _handle_client readline: b'STARTTLS\r\n' INFO mail.log:smtp.py:271 ('::1', 46570, 0, 0) >> b'STARTTLS'DEBUG mail.log:smtp.py:570 ('::1', 46570, 0, 0) << b'220 Ready to start TLS' ERROR asyncio:base_events.py:1760 Fatal error: protocol.data_received() call failed.
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f5de33cd9d0>transport: <_SelectorSocketTransport fd=21 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):File "/usr/lib/python3.11/asyncio/selector_events.py", line 1001, in _read_ready__data_received
self._protocol.data_received(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'SSLProtocol' object has no attribute 'data_received' ERROR mail.log:smtp.py:578 ('::1', 46570, 0, 0) SMTP session exception Traceback (most recent call last):File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 888, in smtp_STARTTLS
await waiterFile "/usr/lib/python3.11/asyncio/selector_events.py", line 1001, in _read_ready__data_received
self._protocol.data_received(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'SSLProtocol' object has no attribute 'data_received' The above exception was the direct cause of the following exception: Traceback (most recent call last):File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 721, in _handle_client
await method(arg)File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 892, in smtp_STARTTLS
raise TLSSetupException() from error aiosmtpd.smtp.TLSSetupException INFO mail.log:smtp.py:510 ('::1', 46570, 0, 0) connection lost_______________________ TestStartTLS.test_starttls_quit ________________________
self = <aiosmtpd.tests.test_starttls.TestStartTLS object at 0x7f5de37848d0> tls_controller = <aiosmtpd.controller.Controller object at 0x7f5de37a32d0> client = <smtplib.SMTP object at 0x7f5de3791610> def test_starttls_quit(self, tls_controller, client): code, _ = client.ehlo("example.com") assert code == 250
resp = client.starttls()
tests/test_starttls.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/smtplib.py:790: in starttls
self.sock = context.wrap_socket(self.sock, /usr/lib/python3.11/ssl.py:517: in wrap_socket return self.sslsocket_class._create( /usr/lib/python3.11/ssl.py:1075: in _create self.do_handshake()_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <ssl.SSLSocket [closed] fd=-1, family=10, type=1, proto=6>, block = False
@_sslcopydoc def do_handshake(self, block=False): self._check_connected() timeout = self.gettimeout() try: if timeout == 0.0 and block: self.settimeout(None)
E ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:992)self._sslobj.do_handshake()
/usr/lib/python3.11/ssl.py:1346: SSLZeroReturnError------------------------------ Captured log setup ------------------------------ INFO mail.log:smtp.py:392 Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO mail.log:smtp.py:504 Peer: ('::1', 46580, 0, 0) INFO mail.log:smtp.py:584 ('::1', 46580, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 46580, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2'
INFO mail.log:smtp.py:524 ('::1', 46580, 0, 0) EOF receivedINFO mail.log:smtp.py:726 ('::1', 46580, 0, 0) Connection lost during _handle_client()
INFO mail.log:smtp.py:510 ('::1', 46580, 0, 0) connection lostINFO mail.log:smtp.py:392 Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO mail.log:smtp.py:504 Peer: ('::1', 46594, 0, 0) INFO mail.log:smtp.py:584 ('::1', 46594, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 46594, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2' ------------------------------ Captured log call ------------------------------- DEBUG mail.log:smtp.py:271 _handle_client readline: b'ehlo example.com\r\n'
INFO mail.log:smtp.py:271 ('::1', 46594, 0, 0) >> b'ehlo example.com' DEBUG mail.log:smtp.py:570 ('::1', 46594, 0, 0) << b'250-ci-331-51154d3a' DEBUG mail.log:smtp.py:570 ('::1', 46594, 0, 0) << b'250-SIZE 33554432' DEBUG mail.log:smtp.py:570 ('::1', 46594, 0, 0) << b'250-SMTPUTF8' DEBUG mail.log:smtp.py:570 ('::1', 46594, 0, 0) << b'250-STARTTLS' DEBUG mail.log:smtp.py:570 ('::1', 46594, 0, 0) << b'250 HELP' DEBUG mail.log:smtp.py:271 _handle_client readline: b'STARTTLS\r\n' INFO mail.log:smtp.py:271 ('::1', 46594, 0, 0) >> b'STARTTLS'DEBUG mail.log:smtp.py:570 ('::1', 46594, 0, 0) << b'220 Ready to start TLS' ERROR asyncio:base_events.py:1760 Fatal error: protocol.data_received() call failed.
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f5de33cc350>transport: <_SelectorSocketTransport fd=20 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):File "/usr/lib/python3.11/asyncio/selector_events.py", line 1001, in _read_ready__data_received
self._protocol.data_received(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'SSLProtocol' object has no attribute 'data_received' ERROR mail.log:smtp.py:578 ('::1', 46594, 0, 0) SMTP session exception Traceback (most recent call last):File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 888, in smtp_STARTTLS
await waiterFile "/usr/lib/python3.11/asyncio/selector_events.py", line 1001, in _read_ready__data_received
self._protocol.data_received(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'SSLProtocol' object has no attribute 'data_received' The above exception was the direct cause of the following exception: Traceback (most recent call last):File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 721, in _handle_client
await method(arg)File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 892, in smtp_STARTTLS
raise TLSSetupException() from error aiosmtpd.smtp.TLSSetupException INFO mail.log:smtp.py:510 ('::1', 46594, 0, 0) connection lost______________________ TestStartTLS.test_failed_handshake ______________________
self = <aiosmtpd.tests.test_starttls.TestStartTLS object at 0x7f5de3784e10> client = <smtplib.SMTP object at 0x7f5de3665210> @handler_data(class_=HandshakeFailingHandler) def test_failed_handshake(self, client): code, _ = client.ehlo("example.com") assert code == 250
resp = client.starttls()
tests/test_starttls.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/smtplib.py:790: in starttls
self.sock = context.wrap_socket(self.sock, /usr/lib/python3.11/ssl.py:517: in wrap_socket return self.sslsocket_class._create( /usr/lib/python3.11/ssl.py:1075: in _create self.do_handshake()_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <ssl.SSLSocket [closed] fd=-1, family=10, type=1, proto=6>, block = False
@_sslcopydoc def do_handshake(self, block=False): self._check_connected() timeout = self.gettimeout() try: if timeout == 0.0 and block: self.settimeout(None)
E ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:992)self._sslobj.do_handshake()
/usr/lib/python3.11/ssl.py:1346: SSLZeroReturnError------------------------------ Captured log setup ------------------------------ INFO mail.log:smtp.py:392 Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO mail.log:smtp.py:504 Peer: ('::1', 46608, 0, 0) INFO mail.log:smtp.py:584 ('::1', 46608, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 46608, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2'
INFO mail.log:smtp.py:524 ('::1', 46608, 0, 0) EOF receivedINFO mail.log:smtp.py:726 ('::1', 46608, 0, 0) Connection lost during _handle_client()
INFO mail.log:smtp.py:510 ('::1', 46608, 0, 0) connection lostINFO mail.log:smtp.py:392 Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO mail.log:smtp.py:504 Peer: ('::1', 46622, 0, 0) INFO mail.log:smtp.py:584 ('::1', 46622, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 46622, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2' ------------------------------ Captured log call ------------------------------- DEBUG mail.log:smtp.py:271 _handle_client readline: b'ehlo example.com\r\n'
INFO mail.log:smtp.py:271 ('::1', 46622, 0, 0) >> b'ehlo example.com' DEBUG mail.log:smtp.py:570 ('::1', 46622, 0, 0) << b'250-ci-331-51154d3a' DEBUG mail.log:smtp.py:570 ('::1', 46622, 0, 0) << b'250-SIZE 33554432' DEBUG mail.log:smtp.py:570 ('::1', 46622, 0, 0) << b'250-SMTPUTF8' DEBUG mail.log:smtp.py:570 ('::1', 46622, 0, 0) << b'250-STARTTLS' DEBUG mail.log:smtp.py:570 ('::1', 46622, 0, 0) << b'250 HELP' DEBUG mail.log:smtp.py:271 _handle_client readline: b'STARTTLS\r\n' INFO mail.log:smtp.py:271 ('::1', 46622, 0, 0) >> b'STARTTLS'DEBUG mail.log:smtp.py:570 ('::1', 46622, 0, 0) << b'220 Ready to start TLS' ERROR asyncio:base_events.py:1760 Fatal error: protocol.data_received() call failed.
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f5de37bcf10>transport: <_SelectorSocketTransport fd=20 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):File "/usr/lib/python3.11/asyncio/selector_events.py", line 1001, in _read_ready__data_received
self._protocol.data_received(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'SSLProtocol' object has no attribute 'data_received' ERROR mail.log:smtp.py:578 ('::1', 46622, 0, 0) SMTP session exception Traceback (most recent call last):File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 888, in smtp_STARTTLS
await waiterFile "/usr/lib/python3.11/asyncio/selector_events.py", line 1001, in _read_ready__data_received
self._protocol.data_received(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'SSLProtocol' object has no attribute 'data_received' The above exception was the direct cause of the following exception: Traceback (most recent call last):File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 721, in _handle_client
await method(arg)File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 892, in smtp_STARTTLS
raise TLSSetupException() from error aiosmtpd.smtp.TLSSetupException INFO mail.log:smtp.py:510 ('::1', 46622, 0, 0) connection lost_______________________ TestTLSEnding.test_eof_received ________________________
self = <aiosmtpd.tests.test_starttls.TestTLSEnding object at 0x7f5de3599750> tls_controller = <aiosmtpd.controller.Controller object at 0x7f5de39e2b90> client = <smtplib.SMTP object at 0x7f5de3664950> @handler_data(class_=EOFingHandler) def test_eof_received(self, tls_controller, client):# I don't like this. It's too intimately involved with the innards of the SMTP # class. But for the life of me, I can't figure out why coverage there fail
# intermittently. ## I suspect it's a race condition, but with what, and how to prevent that from
# happening, that's ... a mystery.# Entering portion of code where hang is possible (upon assertion fail), so
# we must wrap with "try..finally". try: code, mesg = client.ehlo("example.com") assert code == 250
resp = client.starttls()
tests/test_starttls.py:221: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/smtplib.py:790: in starttls
self.sock = context.wrap_socket(self.sock, /usr/lib/python3.11/ssl.py:517: in wrap_socket return self.sslsocket_class._create( /usr/lib/python3.11/ssl.py:1075: in _create self.do_handshake()_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <ssl.SSLSocket [closed] fd=-1, family=10, type=1, proto=6>, block = False
@_sslcopydoc def do_handshake(self, block=False): self._check_connected() timeout = self.gettimeout() try: if timeout == 0.0 and block: self.settimeout(None)
E ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:992)self._sslobj.do_handshake()
/usr/lib/python3.11/ssl.py:1346: SSLZeroReturnError------------------------------ Captured log setup ------------------------------ INFO mail.log:smtp.py:392 Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO mail.log:smtp.py:504 Peer: ('::1', 46678, 0, 0) INFO mail.log:smtp.py:584 ('::1', 46678, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 46678, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2'
INFO mail.log:smtp.py:524 ('::1', 46678, 0, 0) EOF receivedINFO mail.log:smtp.py:726 ('::1', 46678, 0, 0) Connection lost during _handle_client()
INFO mail.log:smtp.py:510 ('::1', 46678, 0, 0) connection lostINFO mail.log:smtp.py:392 Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO mail.log:smtp.py:504 Peer: ('::1', 46692, 0, 0) INFO mail.log:smtp.py:584 ('::1', 46692, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 46692, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2' ------------------------------ Captured log call ------------------------------- DEBUG mail.log:smtp.py:271 _handle_client readline: b'ehlo example.com\r\n'
INFO mail.log:smtp.py:271 ('::1', 46692, 0, 0) >> b'ehlo example.com' DEBUG mail.log:smtp.py:570 ('::1', 46692, 0, 0) << b'250-ci-331-51154d3a' DEBUG mail.log:smtp.py:570 ('::1', 46692, 0, 0) << b'250-SIZE 33554432' DEBUG mail.log:smtp.py:570 ('::1', 46692, 0, 0) << b'250-SMTPUTF8' DEBUG mail.log:smtp.py:570 ('::1', 46692, 0, 0) << b'250-STARTTLS' DEBUG mail.log:smtp.py:570 ('::1', 46692, 0, 0) << b'250 HELP' DEBUG mail.log:smtp.py:271 _handle_client readline: b'STARTTLS\r\n' INFO mail.log:smtp.py:271 ('::1', 46692, 0, 0) >> b'STARTTLS'DEBUG mail.log:smtp.py:570 ('::1', 46692, 0, 0) << b'220 Ready to start TLS' ERROR asyncio:base_events.py:1760 Fatal error: protocol.data_received() call failed.
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f5de111f1d0>transport: <_SelectorSocketTransport fd=20 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):File "/usr/lib/python3.11/asyncio/selector_events.py", line 1001, in _read_ready__data_received
self._protocol.data_received(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'SSLProtocol' object has no attribute 'data_received' ERROR mail.log:smtp.py:578 ('::1', 46692, 0, 0) SMTP session exception Traceback (most recent call last):File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 888, in smtp_STARTTLS
await waiterFile "/usr/lib/python3.11/asyncio/selector_events.py", line 1001, in _read_ready__data_received
self._protocol.data_received(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'SSLProtocol' object has no attribute 'data_received' The above exception was the direct cause of the following exception: Traceback (most recent call last):File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 721, in _handle_client
await method(arg)File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 892, in smtp_STARTTLS
raise TLSSetupException() from error aiosmtpd.smtp.TLSSetupException INFO mail.log:smtp.py:510 ('::1', 46692, 0, 0) connection lost__________________ TestTLSForgetsSessionData.test_forget_ehlo __________________
self = <aiosmtpd.tests.test_starttls.TestTLSForgetsSessionData object at 0x7f5de3598e90>
client = <smtplib.SMTP object at 0x7f5de111f490> def test_forget_ehlo(self, client):
resp = client.starttls()
tests/test_starttls.py:254: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/smtplib.py:790: in starttls
self.sock = context.wrap_socket(self.sock, /usr/lib/python3.11/ssl.py:517: in wrap_socket return self.sslsocket_class._create( /usr/lib/python3.11/ssl.py:1075: in _create self.do_handshake()_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <ssl.SSLSocket [closed] fd=-1, family=10, type=1, proto=6>, block = False
@_sslcopydoc def do_handshake(self, block=False): self._check_connected() timeout = self.gettimeout() try: if timeout == 0.0 and block: self.settimeout(None)
E ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:992)self._sslobj.do_handshake()
/usr/lib/python3.11/ssl.py:1346: SSLZeroReturnError------------------------------ Captured log setup ------------------------------ INFO mail.log:smtp.py:392 Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO mail.log:smtp.py:504 Peer: ('::1', 46734, 0, 0) INFO mail.log:smtp.py:584 ('::1', 46734, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 46734, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2'
INFO mail.log:smtp.py:524 ('::1', 46734, 0, 0) EOF receivedINFO mail.log:smtp.py:726 ('::1', 46734, 0, 0) Connection lost during _handle_client()
INFO mail.log:smtp.py:510 ('::1', 46734, 0, 0) connection lostINFO mail.log:smtp.py:392 Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO mail.log:smtp.py:504 Peer: ('::1', 46750, 0, 0) INFO mail.log:smtp.py:584 ('::1', 46750, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 46750, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2' ------------------------------ Captured log call ------------------------------- DEBUG mail.log:smtp.py:271 _handle_client readline: b'ehlo [127.0.1.1]\r\n'
INFO mail.log:smtp.py:271 ('::1', 46750, 0, 0) >> b'ehlo [127.0.1.1]' DEBUG mail.log:smtp.py:570 ('::1', 46750, 0, 0) << b'250-ci-331-51154d3a' DEBUG mail.log:smtp.py:570 ('::1', 46750, 0, 0) << b'250-SIZE 33554432' DEBUG mail.log:smtp.py:570 ('::1', 46750, 0, 0) << b'250-SMTPUTF8' DEBUG mail.log:smtp.py:570 ('::1', 46750, 0, 0) << b'250-STARTTLS' DEBUG mail.log:smtp.py:570 ('::1', 46750, 0, 0) << b'250 HELP' DEBUG mail.log:smtp.py:271 _handle_client readline: b'STARTTLS\r\n' INFO mail.log:smtp.py:271 ('::1', 46750, 0, 0) >> b'STARTTLS'DEBUG mail.log:smtp.py:570 ('::1', 46750, 0, 0) << b'220 Ready to start TLS' ERROR asyncio:base_events.py:1760 Fatal error: protocol.data_received() call failed.
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f5de3404090>transport: <_SelectorSocketTransport fd=20 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):File "/usr/lib/python3.11/asyncio/selector_events.py", line 1001, in _read_ready__data_received
self._protocol.data_received(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'SSLProtocol' object has no attribute 'data_received' ERROR mail.log:smtp.py:578 ('::1', 46750, 0, 0) SMTP session exception Traceback (most recent call last):File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 888, in smtp_STARTTLS
await waiterFile "/usr/lib/python3.11/asyncio/selector_events.py", line 1001, in _read_ready__data_received
self._protocol.data_received(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'SSLProtocol' object has no attribute 'data_received' The above exception was the direct cause of the following exception: Traceback (most recent call last):File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 721, in _handle_client
await method(arg)File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 892, in smtp_STARTTLS
raise TLSSetupException() from error aiosmtpd.smtp.TLSSetupException INFO mail.log:smtp.py:510 ('::1', 46750, 0, 0) connection lost__________________ TestTLSForgetsSessionData.test_forget_mail __________________
self = <aiosmtpd.tests.test_starttls.TestTLSForgetsSessionData object at 0x7f5de3785b10>
client = <smtplib.SMTP object at 0x7f5de3434d50> @pytest.mark.filterwarnings("ignore::pytest.PytestUnraisableExceptionWarning") def test_forget_mail(self, client): code, _ = client.ehlo("example.com") assert code == 250 resp = client.mail("sen...@example.com") assert resp == S.S250_OK
resp = client.starttls()
tests/test_starttls.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/smtplib.py:790: in starttls
self.sock = context.wrap_socket(self.sock, /usr/lib/python3.11/ssl.py:517: in wrap_socket return self.sslsocket_class._create( /usr/lib/python3.11/ssl.py:1075: in _create self.do_handshake()_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <ssl.SSLSocket [closed] fd=-1, family=10, type=1, proto=6>, block = False
@_sslcopydoc def do_handshake(self, block=False): self._check_connected() timeout = self.gettimeout() try: if timeout == 0.0 and block: self.settimeout(None)
E ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:992)self._sslobj.do_handshake()
/usr/lib/python3.11/ssl.py:1346: SSLZeroReturnError------------------------------ Captured log setup ------------------------------ INFO mail.log:smtp.py:392 Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO mail.log:smtp.py:504 Peer: ('::1', 46754, 0, 0) INFO mail.log:smtp.py:584 ('::1', 46754, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 46754, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2'
INFO mail.log:smtp.py:524 ('::1', 46754, 0, 0) EOF receivedINFO mail.log:smtp.py:726 ('::1', 46754, 0, 0) Connection lost during _handle_client() INFO mail.log:smtp.py:392 Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO mail.log:smtp.py:510 ('::1', 46754, 0, 0) connection lost INFO mail.log:smtp.py:504 Peer: ('::1', 46758, 0, 0) INFO mail.log:smtp.py:584 ('::1', 46758, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 46758, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2' ------------------------------ Captured log call ------------------------------- DEBUG mail.log:smtp.py:271 _handle_client readline: b'ehlo example.com\r\n'
INFO mail.log:smtp.py:271 ('::1', 46758, 0, 0) >> b'ehlo example.com' DEBUG mail.log:smtp.py:570 ('::1', 46758, 0, 0) << b'250-ci-331-51154d3a' DEBUG mail.log:smtp.py:570 ('::1', 46758, 0, 0) << b'250-SIZE 33554432' DEBUG mail.log:smtp.py:570 ('::1', 46758, 0, 0) << b'250-SMTPUTF8' DEBUG mail.log:smtp.py:570 ('::1', 46758, 0, 0) << b'250-STARTTLS' DEBUG mail.log:smtp.py:570 ('::1', 46758, 0, 0) << b'250 HELP'DEBUG mail.log:smtp.py:271 _handle_client readline: b'mail FROM:<sen...@example.com>\r\n' INFO mail.log:smtp.py:271 ('::1', 46758, 0, 0) >> b'mail FROM:<sen...@example.com>' INFO mail.log:smtp.py:1264 ('::1', 46758, 0, 0) sender: sen...@example.com
DEBUG mail.log:smtp.py:570 ('::1', 46758, 0, 0) << b'250 OK' DEBUG mail.log:smtp.py:271 _handle_client readline: b'STARTTLS\r\n' INFO mail.log:smtp.py:271 ('::1', 46758, 0, 0) >> b'STARTTLS'DEBUG mail.log:smtp.py:570 ('::1', 46758, 0, 0) << b'220 Ready to start TLS' ERROR asyncio:base_events.py:1760 Fatal error: protocol.data_received() call failed.
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f5de111fcd0>transport: <_SelectorSocketTransport fd=21 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):File "/usr/lib/python3.11/asyncio/selector_events.py", line 1001, in _read_ready__data_received
self._protocol.data_received(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'SSLProtocol' object has no attribute 'data_received' ERROR mail.log:smtp.py:578 ('::1', 46758, 0, 0) SMTP session exception Traceback (most recent call last):File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 888, in smtp_STARTTLS
await waiterFile "/usr/lib/python3.11/asyncio/selector_events.py", line 1001, in _read_ready__data_received
self._protocol.data_received(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'SSLProtocol' object has no attribute 'data_received' The above exception was the direct cause of the following exception: Traceback (most recent call last):File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 721, in _handle_client
await method(arg)File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 892, in smtp_STARTTLS
raise TLSSetupException() from error aiosmtpd.smtp.TLSSetupException INFO mail.log:smtp.py:510 ('::1', 46758, 0, 0) connection lost__________________ TestTLSForgetsSessionData.test_forget_rcpt __________________
self = <aiosmtpd.tests.test_starttls.TestTLSForgetsSessionData object at 0x7f5de3787710>
client = <smtplib.SMTP object at 0x7f5de108ba90> def test_forget_rcpt(self, client): code, _ = client.ehlo("example.com") assert code == 250 resp = client.mail("sen...@example.com") assert resp == S.S250_OK resp = client.rcpt("r...@example.com") assert resp == S.S250_OK
resp = client.starttls()
tests/test_starttls.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/smtplib.py:790: in starttls
self.sock = context.wrap_socket(self.sock, /usr/lib/python3.11/ssl.py:517: in wrap_socket return self.sslsocket_class._create( /usr/lib/python3.11/ssl.py:1075: in _create self.do_handshake()_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <ssl.SSLSocket [closed] fd=-1, family=10, type=1, proto=6>, block = False
@_sslcopydoc def do_handshake(self, block=False): self._check_connected() timeout = self.gettimeout() try: if timeout == 0.0 and block: self.settimeout(None)
E ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:992)self._sslobj.do_handshake()
/usr/lib/python3.11/ssl.py:1346: SSLZeroReturnError------------------------------ Captured log setup ------------------------------ INFO mail.log:smtp.py:392 Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO mail.log:smtp.py:504 Peer: ('::1', 46768, 0, 0) INFO mail.log:smtp.py:584 ('::1', 46768, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 46768, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2'
INFO mail.log:smtp.py:524 ('::1', 46768, 0, 0) EOF receivedINFO mail.log:smtp.py:726 ('::1', 46768, 0, 0) Connection lost during _handle_client()
INFO mail.log:smtp.py:510 ('::1', 46768, 0, 0) connection lostINFO mail.log:smtp.py:392 Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO mail.log:smtp.py:504 Peer: ('::1', 46780, 0, 0) INFO mail.log:smtp.py:584 ('::1', 46780, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 46780, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2' ------------------------------ Captured log call ------------------------------- DEBUG mail.log:smtp.py:271 _handle_client readline: b'ehlo example.com\r\n'
INFO mail.log:smtp.py:271 ('::1', 46780, 0, 0) >> b'ehlo example.com' DEBUG mail.log:smtp.py:570 ('::1', 46780, 0, 0) << b'250-ci-331-51154d3a' DEBUG mail.log:smtp.py:570 ('::1', 46780, 0, 0) << b'250-SIZE 33554432' DEBUG mail.log:smtp.py:570 ('::1', 46780, 0, 0) << b'250-SMTPUTF8' DEBUG mail.log:smtp.py:570 ('::1', 46780, 0, 0) << b'250-STARTTLS' DEBUG mail.log:smtp.py:570 ('::1', 46780, 0, 0) << b'250 HELP'DEBUG mail.log:smtp.py:271 _handle_client readline: b'mail FROM:<sen...@example.com>\r\n' INFO mail.log:smtp.py:271 ('::1', 46780, 0, 0) >> b'mail FROM:<sen...@example.com>' INFO mail.log:smtp.py:1264 ('::1', 46780, 0, 0) sender: sen...@example.com
DEBUG mail.log:smtp.py:570 ('::1', 46780, 0, 0) << b'250 OK'DEBUG mail.log:smtp.py:271 _handle_client readline: b'rcpt TO:<r...@example.com>\r\n' INFO mail.log:smtp.py:271 ('::1', 46780, 0, 0) >> b'rcpt TO:<r...@example.com>'
INFO mail.log:smtp.py:1306 ('::1', 46780, 0, 0) recip: r...@example.com DEBUG mail.log:smtp.py:570 ('::1', 46780, 0, 0) << b'250 OK' DEBUG mail.log:smtp.py:271 _handle_client readline: b'STARTTLS\r\n' INFO mail.log:smtp.py:271 ('::1', 46780, 0, 0) >> b'STARTTLS'DEBUG mail.log:smtp.py:570 ('::1', 46780, 0, 0) << b'220 Ready to start TLS' ERROR asyncio:base_events.py:1760 Fatal error: protocol.data_received() call failed.
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f5de3593f10>transport: <_SelectorSocketTransport fd=20 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):File "/usr/lib/python3.11/asyncio/selector_events.py", line 1001, in _read_ready__data_received
self._protocol.data_received(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'SSLProtocol' object has no attribute 'data_received' ERROR mail.log:smtp.py:578 ('::1', 46780, 0, 0) SMTP session exception Traceback (most recent call last):File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 888, in smtp_STARTTLS
await waiterFile "/usr/lib/python3.11/asyncio/selector_events.py", line 1001, in _read_ready__data_received
self._protocol.data_received(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'SSLProtocol' object has no attribute 'data_received' The above exception was the direct cause of the following exception: Traceback (most recent call last):File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 721, in _handle_client
await method(arg)File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 892, in smtp_STARTTLS
raise TLSSetupException() from error aiosmtpd.smtp.TLSSetupException INFO mail.log:smtp.py:510 ('::1', 46780, 0, 0) connection lost_______________________ TestRequireTLSAUTH.test_auth_tls _______________________
self = <aiosmtpd.tests.test_starttls.TestRequireTLSAUTH object at 0x7f5de35a5d90>
client = <smtplib.SMTP object at 0x7f5de3666550> def test_auth_tls(self, client):
resp = client.starttls()
tests/test_starttls.py:346: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/smtplib.py:790: in starttls
self.sock = context.wrap_socket(self.sock, /usr/lib/python3.11/ssl.py:517: in wrap_socket return self.sslsocket_class._create( /usr/lib/python3.11/ssl.py:1075: in _create self.do_handshake()_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <ssl.SSLSocket [closed] fd=-1, family=10, type=1, proto=6>, block = False
@_sslcopydoc def do_handshake(self, block=False): self._check_connected() timeout = self.gettimeout() try: if timeout == 0.0 and block: self.settimeout(None)
E ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:992)self._sslobj.do_handshake()
/usr/lib/python3.11/ssl.py:1346: SSLZeroReturnError------------------------------ Captured log setup ------------------------------ INFO mail.log:smtp.py:392 Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO mail.log:smtp.py:504 Peer: ('::1', 54952, 0, 0) INFO mail.log:smtp.py:584 ('::1', 54952, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 54952, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2'
INFO mail.log:smtp.py:524 ('::1', 54952, 0, 0) EOF receivedINFO mail.log:smtp.py:726 ('::1', 54952, 0, 0) Connection lost during _handle_client() INFO mail.log:smtp.py:392 Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO mail.log:smtp.py:510 ('::1', 54952, 0, 0) connection lost INFO mail.log:smtp.py:504 Peer: ('::1', 54968, 0, 0) INFO mail.log:smtp.py:584 ('::1', 54968, 0, 0) handling connectionDEBUG mail.log:smtp.py:570 ('::1', 54968, 0, 0) << b'220 ci-331-51154d3a Python SMTP 1.4.2' ------------------------------ Captured log call ------------------------------- DEBUG mail.log:smtp.py:271 _handle_client readline: b'ehlo [127.0.1.1]\r\n'
INFO mail.log:smtp.py:271 ('::1', 54968, 0, 0) >> b'ehlo [127.0.1.1]' DEBUG mail.log:smtp.py:570 ('::1', 54968, 0, 0) << b'250-ci-331-51154d3a' DEBUG mail.log:smtp.py:570 ('::1', 54968, 0, 0) << b'250-SIZE 33554432' DEBUG mail.log:smtp.py:570 ('::1', 54968, 0, 0) << b'250-SMTPUTF8' DEBUG mail.log:smtp.py:570 ('::1', 54968, 0, 0) << b'250-STARTTLS' DEBUG mail.log:smtp.py:570 ('::1', 54968, 0, 0) << b'250 HELP' DEBUG mail.log:smtp.py:271 _handle_client readline: b'STARTTLS\r\n' INFO mail.log:smtp.py:271 ('::1', 54968, 0, 0) >> b'STARTTLS'DEBUG mail.log:smtp.py:570 ('::1', 54968, 0, 0) << b'220 Ready to start TLS' ERROR asyncio:base_events.py:1760 Fatal error: protocol.data_received() call failed.
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f5de35abc90>transport: <_SelectorSocketTransport fd=21 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):File "/usr/lib/python3.11/asyncio/selector_events.py", line 1001, in _read_ready__data_received
self._protocol.data_received(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'SSLProtocol' object has no attribute 'data_received' ERROR mail.log:smtp.py:578 ('::1', 54968, 0, 0) SMTP session exception Traceback (most recent call last):File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 888, in smtp_STARTTLS
await waiterFile "/usr/lib/python3.11/asyncio/selector_events.py", line 1001, in _read_ready__data_received
self._protocol.data_received(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'SSLProtocol' object has no attribute 'data_received' The above exception was the direct cause of the following exception: Traceback (most recent call last):File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 721, in _handle_client
await method(arg)File "/usr/lib/python3/dist-packages/aiosmtpd/smtp.py", line 892, in smtp_STARTTLS
raise TLSSetupException() from error aiosmtpd.smtp.TLSSetupException INFO mail.log:smtp.py:510 ('::1', 54968, 0, 0) connection lost=============================== warnings summary ===============================
tests/test_handlers.py::TestMessage::test_message_async tests/test_handlers.py::TestMessage::test_message_decoded_async/usr/lib/python3/dist-packages/aiosmtpd/handlers.py:183: DeprecationWarning: There is no current event loop
self.loop = loop or asyncio.get_event_loop() tests/test_handlers.py: 2 warnings tests/test_server.py: 2 warnings tests/test_smtp.py: 3 warnings tests/test_starttls.py: 4 warnings/usr/lib/python3/dist-packages/aiosmtpd/smtp.py:321: DeprecationWarning: There is no current event loop
self.loop = loop if loop else asyncio.get_event_loop() tests/test_main.py: 13 warnings tests/test_proxyprotocol.py: 74 warnings tests/test_server.py: 1 warning tests/test_smtp.py: 2 warnings/usr/lib/python3/dist-packages/aiosmtpd/tests/conftest.py:197: DeprecationWarning: There is no current event loop
default_loop = asyncio.get_event_loop() tests/test_main.py::TestMain::test_setuid tests/test_main.py::TestMain::test_debug_0 tests/test_main.py::TestMain::test_debug_1 tests/test_main.py::TestMain::test_debug_2 tests/test_main.py::TestMain::test_debug_3 tests/test_main.py::TestMainByWatcher::test_tls tests/test_main.py::TestMainByWatcher::test_tls_noreq tests/test_main.py::TestMainByWatcher::test_smtps tests/test_main.py::TestSigint::test_keyboard_interrupt/usr/lib/python3/dist-packages/aiosmtpd/main.py:254: DeprecationWarning: There is no current event loop
loop = asyncio.get_event_loop() tests/test_main.py::TestMain::test_debug_3/usr/lib/python3/dist-packages/aiosmtpd/tests/test_main.py:210: DeprecationWarning: There is no current event loop
assert asyncio.get_event_loop().get_debug() ../_pytest/cacheprovider.py:433/usr/lib/python3/dist-packages/_pytest/cacheprovider.py:433: PytestCacheWarning: could not create cache path /usr/lib/python3/dist-packages/aiosmtpd/.pytest_cache/v/cache/nodeids
config.cache.set("cache/nodeids", sorted(self.cached_nodeids)) ../_pytest/cacheprovider.py:387/usr/lib/python3/dist-packages/_pytest/cacheprovider.py:387: PytestCacheWarning: could not create cache path /usr/lib/python3/dist-packages/aiosmtpd/.pytest_cache/v/cache/lastfailed
config.cache.set("cache/lastfailed", self.lastfailed) ../_pytest/stepwise.py:52/usr/lib/python3/dist-packages/_pytest/stepwise.py:52: PytestCacheWarning: could not create cache path /usr/lib/python3/dist-packages/aiosmtpd/.pytest_cache/v/cache/stepwise
session.config.cache.set(STEPWISE_CACHE_DIR, []) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html=========================== short test summary info ============================ FAILED tests/test_smtp.py::TestSMTPAuth::test_auth_loginteract_warning - asse... FAILED tests/test_smtp.py::TestAuthMechanisms::test_plain1_empty - assert (50... FAILED tests/test_smtp.py::TestAuthMechanisms::test_plain2_no_credentials - a...
FAILED tests/test_smtp.py::TestAuthMechanisms::test_login3_empty_credentialsFAILED tests/test_smtp.py::TestAuthMechanisms::test_login3_abort_password - a... FAILED tests/test_starttls.py::TestStartTLS::test_starttls - ssl.SSLZeroRetur... FAILED tests/test_starttls.py::TestStartTLS::test_starttls_quit - ssl.SSLZero... FAILED tests/test_starttls.py::TestStartTLS::test_failed_handshake - ssl.SSLZ... FAILED tests/test_starttls.py::TestTLSEnding::test_eof_received - ssl.SSLZero... FAILED tests/test_starttls.py::TestTLSForgetsSessionData::test_forget_ehlo - ... FAILED tests/test_starttls.py::TestTLSForgetsSessionData::test_forget_mail - ... FAILED tests/test_starttls.py::TestTLSForgetsSessionData::test_forget_rcpt - ... FAILED tests/test_starttls.py::TestRequireTLSAUTH::test_auth_tls - ssl.SSLZer... ERROR tests/test_smtp.py::TestSMTPAuth::test_auth_loginteract_warning - smtpl... = 13 failed, 526 passed, 1 xfailed, 4 xpassed, 116 warnings, 1 error in 52.08s =
autopkgtest [23:01:24]: test python3-aiosmtpd
OpenPGP_signature
Description: OpenPGP digital signature