STINNER Victor added the comment: Traceback from tracemalloc:
10-STABLE-amd64% ./python -X tracemalloc=10 -m test -v test_logging --fail-env-changed (...) /usr/home/haypo/cpython/Lib/test/support/__init__.py:1515: ResourceWarning: unclosed <socket.socket fd=6, family=AddressFamily.AF_INET, type=536870913, proto=0, laddr=('127.0.0.1', 26785), raddr=('127.0.0.1', 26788)> gc.collect() Object allocated at (most recent call first): File "/usr/home/haypo/cpython/Lib/socket.py", lineno 210 sock = socket(self.family, type, self.proto, fileno=fd) File "/usr/home/haypo/cpython/Lib/asyncore.py", lineno 348 conn, addr = self.socket.accept() File "/usr/home/haypo/cpython/Lib/asyncore.py", lineno 492 pair = self.accept() File "/usr/home/haypo/cpython/Lib/asyncore.py", lineno 417 self.handle_accept() File "/usr/home/haypo/cpython/Lib/asyncore.py", lineno 83 obj.handle_read_event() File "/usr/home/haypo/cpython/Lib/asyncore.py", lineno 150 read(obj) File "/usr/home/haypo/cpython/Lib/asyncore.py", lineno 203 poll_fun(timeout, map) File "/usr/home/haypo/cpython/Lib/test/test_logging.py", lineno 782 asyncore.loop(poll_interval, map=self._map) File "/usr/home/haypo/cpython/Lib/threading.py", lineno 865 self._target(*self._args, **self._kwargs) File "/usr/home/haypo/cpython/Lib/threading.py", lineno 917 self.run() So it seems like the socket was created in TestSMTPServer.serve_forever() of test_logging, which is used by SMTPHandlerTest.test_basic(). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31235> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com