-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Gentoo Refleaks 3.7: test_smtplib has dangling threads #78427
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
Comments
The Gentoo Refleaks 3.7 buildbot is reporting that test_smtplib may be leaving with dangling threads: https://buildbot.python.org/all/#builders/114/builds/179 FAILED (errors=7) |
New failure on AMD64 Windows8.1 Refleaks 3.6: |
Ah, sorry. we just modernized test_smtplib's __main__ section, and I think we lost the thread cleanup code that used to be run around the test suite. We need to add the thread cleanup decorators. |
I think it may be something extra as test_send_message_error_on_non_ascii_addrs_if_no_smtputf8 is failing when you run the test with -R: ./python -W error -m test test_smtplib -R 3:3 Warning -- threading._dangling was modified by test_smtplib
Before: <_weakrefset.WeakSet object at 0x10ed7dd70>
After: <_weakrefset.WeakSet object at 0x10f619830>
test test_smtplib failed -- Traceback (most recent call last):
File "/Users/pgalindo3/cpython/Lib/test/test_smtplib.py", line 1232, in test_send_message_error_on_non_ascii_addrs_if_no_smtputf8
smtp.send_message(msg))
File "/Users/pgalindo3/cpython/Lib/unittest/case.py", line 743, in assertRaises
return context.handle('assertRaises', args, kwargs)
File "/Users/pgalindo3/cpython/Lib/unittest/case.py", line 178, in handle
callable_obj(*args, **kwargs)
TypeError: 'dict' object is not callable test_smtplib failed == Tests result: FAILURE == 1 test failed: Total duration: 16 sec 566 ms |
The TypeError is because the test is misusing the assertRaises API: self.assertRaises(smtplib.SMTPNotSupportedError,
smtp.send_message(msg)) should be self.assertRaises(smtplib.SMTPNotSupportedError,
smtp.send_message, msg) |
That's not the code I thought I merged. I'll have to take a look at what actually got merged. |
That was from commit 48ed88a |
Oh, sorry, my bad. That was precisely what commit 48ed88a changed. The problem with running with -R still happens: ====================================================================== Traceback (most recent call last):
File "/Users/pgalindo3/cpython/Lib/test/test_smtplib.py", line 1100, in test_name_field_not_included_in_envelop_addresses
self.assertDictEqual(smtp.send_message(message), {})
File "/Users/pgalindo3/cpython/Lib/smtplib.py", line 967, in send_message
rcpt_options)
File "/Users/pgalindo3/cpython/Lib/smtplib.py", line 861, in sendmail
(code, resp) = self.mail(from_addr, esmtp_opts)
File "/Users/pgalindo3/cpython/Lib/smtplib.py", line 532, in mail
'SMTPUTF8 not supported by server')
smtplib.SMTPNotSupportedError: SMTPUTF8 not supported by server Ran 60 tests in 1.365s FAILED (errors=7) == Tests result: FAILURE == 1 test failed: Total duration: 2 sec 920 ms |
That's due to another bug, which will get fixed by bpo-32814, unless you'd like to generate a PR with the this fix in it (fixing the mutable default for smtp_options). |
This is just to note that I'm investigating this issue as part of the CPython sprint in EuroPython. |
See also bpo-32657. |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: