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
test.test_logging.SMTPHandlerTest failing on Snow Leopard #67400
Comments
This seems to be related to bpo-20605 where _socket.getaddrinfo() mysteriously fails on some Snow Leopard systems but not others; I don't think the cause of that one was ever explained but this appears to be the same error: ====================================================================== Traceback (most recent call last):
File "/Users/geoff/Documents/programming/cpython/Lib/test/test_logging.py", line 930, in test_basic
sockmap)
File "/Users/geoff/Documents/programming/cpython/Lib/test/test_logging.py", line 687, in __init__
decode_data=True)
File "/Users/geoff/Documents/programming/cpython/Lib/smtpd.py", line 654, in __init__
type=socket.SOCK_STREAM)
File "/Users/geoff/Documents/programming/cpython/Lib/socket.py", line 730, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known |
Yes, this has the same root cause as the failure in bpo-20605 since SMTPServer in smtpd.py uses getaddrinfo. I'm now able to reliably reproduce the failure. The system getaddrinfo failure is seen when the OS X 10.6 system's network configuration is *not* using the local mdns for its primary domain service (which can be checked with "scutil --dns"); it fails when using an external dns as its primary dns service. At least that's one failure scenario. In any case, this seems to have been fixed in later versions of OS X, the problem appears to be unique to getaddrinfo (gethostbyname works OK), and it's only this one test. I'm tempted to just close this as "won't fix"; on the other hand, it's easy enough to change this test to use '127.0.0.0' instead of 'localhost'; there are precedents for doing that for other reasons (bpo-18792, for example). Here's a patch that does so and thus avoids the potential problem on 10.6. I'll apply it if there are no objections. |
No objections from me. |
New changeset 90b664532d1c by Ned Deily in branch '3.4': New changeset e3dfe942697e by Ned Deily in branch 'default': |
OK, the workaround is applied for 3.4.3 and 3.5.0. |
New changeset 65ac2b992673 by Ned Deily in branch '3.4': New changeset 2d71d0f954fb by Ned Deily in branch 'default': |
I *thought* I had tested 3.4 before; sorry about that! |
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: