https://github.com/python/cpython/commit/a7719e27b3cad0f2b86cb932a76cbe55c541b02e commit: a7719e27b3cad0f2b86cb932a76cbe55c541b02e branch: master author: Victor Stinner <victor.stinner at gmail.com> committer: GitHub <noreply at github.com> date: 2017年08月19日T00:34:00+02:00 summary: bpo-31235: Fix ResourceWarning in test_logging (#3147) files: M Lib/test/test_logging.py diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 226532a9792..f4aef9f8962 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -797,6 +797,8 @@ def stop(self, timeout=None): """ self.close() self._thread.join(timeout) + asyncore.close_all(map=self._map, ignore_all=True) + alive = self._thread.is_alive() self._thread = None if alive: