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.

Author JustinTArthur
Recipients JustinTArthur, aeros, asvetlov, pablogsal, vstinner, yselivanov
Date 2020-10-14.04:31:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1602649907.63.0.465483653487.issue38912@roundup.psfhosted.org>
In-reply-to
Content
The "'NoneType' object has no attribute 'close'" error is likely caused by a race against the loop calling the test protocol object's connection_made callback. I was able to reproduce this case occasionally on macOS and it's likely platform-agnostic. Given server/connection cleanup isn't context-managed or finally-driven on the affected tests, raising the NoneType error will skip cleanup and we see additional exceptions from unclosed networking components being garbage collected.

Tests using this test protocol pattern were either waiting for the callback already or were waiting on network i/o that happens long after connection establishment with the exception of:
- `test_create_server_ssl_verified`
- `test_create_unix_server_ssl_verified`

PR 22691 ensures those two tests wait for the connect callbacks as well.

This may not address the env changed error from recent msg378481, as the initial error is not necessarily disclosed in that log.
History
Date User Action Args
2020-10-14 04:31:47JustinTArthursetrecipients: + JustinTArthur, vstinner, asvetlov, yselivanov, pablogsal, aeros
2020-10-14 04:31:47JustinTArthursetmessageid: <1602649907.63.0.465483653487.issue38912@roundup.psfhosted.org>
2020-10-14 04:31:47JustinTArthurlinkissue38912 messages
2020-10-14 04:31:47JustinTArthurcreate