summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/base_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-11-20 15:14:07 (GMT)
committerGitHub <noreply@github.com>2017-11-20 15:14:07 (GMT)
commit44862df2eeec62adea20672b0fe2a5d3e160569e (patch)
treee8f66bbbd2b7769ca42a292f553a7ecacb29da57 /Lib/asyncio/base_events.py
parent04dee2720851ec39e831beaa3edc0c59f228f461 (diff)
downloadcpython-44862df2eeec62adea20672b0fe2a5d3e160569e.zip
cpython-44862df2eeec62adea20672b0fe2a5d3e160569e.tar.gz
cpython-44862df2eeec62adea20672b0fe2a5d3e160569e.tar.bz2
bpo-32047: -X dev enables asyncio debug mode (#4418)
The new -X dev command line option now also enables asyncio debug mode.
Diffstat (limited to 'Lib/asyncio/base_events.py')
-rw-r--r--Lib/asyncio/base_events.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index b94856c..bb04aef 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -244,8 +244,7 @@ class BaseEventLoop(events.AbstractEventLoop):
self._thread_id = None
self._clock_resolution = time.get_clock_info('monotonic').resolution
self._exception_handler = None
- self.set_debug((not sys.flags.ignore_environment
- and bool(os.environ.get('PYTHONASYNCIODEBUG'))))
+ self.set_debug(coroutines._is_debug_mode())
# In debug mode, if the execution of a callback or a step of a task
# exceed this duration in seconds, the slow callback/task is logged.
self.slow_callback_duration = 0.1