mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
bpo-32047: -X dev enables asyncio debug mode (#4418)
The new -X dev command line option now also enables asyncio debug mode.
This commit is contained in:
parent
04dee27208
commit
44862df2ee
6 changed files with 42 additions and 18 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue