[Python-checkins] bpo-11555: Enhance IocpProactor.close() log again (GH-11563)

Victor Stinner webhook-mailer at python.org
Tue Jan 15 06:13:51 EST 2019


https://github.com/python/cpython/commit/b91140fdb17472d03a7b7971f143c08a40fde923
commit: b91140fdb17472d03a7b7971f143c08a40fde923
branch: master
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2019-01-15T12:13:48+01:00
summary:

bpo-11555: Enhance IocpProactor.close() log again (GH-11563)

Add repr(self) to the log to display the number of pending overlapped
in the log.

files:
M Lib/asyncio/windows_events.py

diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py
index 7f264e6f9a07..29750f18d80c 100644
--- a/Lib/asyncio/windows_events.py
+++ b/Lib/asyncio/windows_events.py
@@ -811,9 +811,8 @@ def close(self):
         next_msg = start_time + msg_update
         while self._cache:
             if next_msg <= time.monotonic():
-                logger.debug('IocpProactor.close(): '
-                             'loop is running after closing for %.1f seconds',
-                             time.monotonic() - start_time)
+                logger.debug('%r is running after closing for %.1f seconds',
+                             self, time.monotonic() - start_time)
                 next_msg = time.monotonic() + msg_update
 
             # handle a few events, or timeout



More information about the Python-checkins mailing list