Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c082ee6 commit 1580fe3Copy full SHA for 1580fe3
2 files changed
Lib/asyncio/base_events.py
@@ -834,8 +834,7 @@ def _run_once(self):
834
when = self._scheduled[0]._when
835
timeout = max(0, when - self.time())
836
837
- # TODO: Instrumentation only in debug mode?
838
- if logger.isEnabledFor(logging.INFO):
+ if self._debug:
839
t0 = self.time()
840
event_list = self._selector.select(timeout)
841
dt = self.time() - t0
Lib/test/test_asyncio/test_base_events.py
@@ -247,6 +247,9 @@ def slow_select(timeout):
247
time.sleep(1.0)
248
return []
249
250
+ # logging needs debug flag
251
+ self.loop.set_debug(True)
252
+
253
# Log to INFO level if timeout > 1.0 sec.
254
self.loop._selector.select = slow_select
255
self.loop._process_events = mock.Mock()
0 commit comments