homepage

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.

classification
Title: Failures in test.test_logging
Type: behavior Stage: resolved
Components: Library (Lib), Tests Versions: Python 3.6
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: abarry, methane, r.david.murray, vinay.sajip
Priority: normal Keywords:

Created on 2016年06月30日 17:00 by abarry, last changed 2022年04月11日 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_logging failures.txt abarry, 2016年06月30日 17:00
Messages (5)
msg269602 - (view) Author: Anilyka Barry (abarry) * (Python triager) Date: 2016年06月30日 17:00
Ran the test as 'python -W error -m test.test_logging' on latest 3.6 version. No idea what causes this; full traceback attached. Not sure if it's relevant, but I'm running Windows 7.
msg269658 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016年07月01日 11:37
Maybe, `socket.getfqdn()` returns non-ASCII string in your environment.
smtpd.py has `-u` option which enables utf-8 support.
smtpd.SMTPServer has enable_SMTPUTF8 option.
test_logging.TestSMTPServer should enable this option.
Could you test adding `enable_SMTPUTF8=True` kwarg here?
https://github.com/python/cpython/blob/master/Lib/test/test_logging.py#L682-L683 
msg269670 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016年07月01日 14:15
Domain names should never have non-ascii in them. They should be IDNA encoded. There is a known problem where Windows will return non-ascii domain names if the local hostname is configured naively (see issue 9377). SMTPUTF8 might be a workaround in smtpd's case, since I think it will allow handling of such domain names, but that could actually be considered an RFC violation in smtpd if it works :)
That said, looking at the traceback I'm not convinced that's the problem. The test using support.HOST, and that is 127.0.0.1.
msg271909 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2016年08月03日 15:03
I am unable to reproduce this under Windows with either 32-bit or 64-bit Python, using revision 26dd6e7f. I used Windows 10 rather than 7 as that's all I can test on, but I don't believe it would make a difference. Is this error still reproducible? If not, I'll close this issue.
msg272038 - (view) Author: Anilyka Barry (abarry) * (Python triager) Date: 2016年08月05日 16:03
I'm not home to check, but judging by the error message and previous discussions with other developers, it seems indeed like an issue with a non-ASCII character in my hostname. I've changed my hostname since then, so I'm going to close this as won't fix. If it turns out that the issue is still present, I'll re-open it.
More details: I'm 90% sure that the issue is that Windows encodes non-ASCII characters as 'cp1252' (at least on my machine); subsequently trying to decode as 'ascii' or 'utf-8' doesn't work and throws an error. There's already another open issue about this (#26226).
History
Date User Action Args
2022年04月11日 14:58:33adminsetgithub: 71611
2016年08月05日 16:03:03abarrysetstatus: pending -> closed
resolution: wont fix
messages: + msg272038

stage: needs patch -> resolved
2016年08月03日 15:03:46vinay.sajipsetstatus: open -> pending

messages: + msg271909
2016年07月01日 14:15:46r.david.murraysetnosy: + r.david.murray
messages: + msg269670
2016年07月01日 11:37:40methanesetnosy: + methane
messages: + msg269658
2016年06月30日 17:00:01abarrycreate

AltStyle によって変換されたページ (->オリジナル) /